import{a5 as V,bD as q,l as $,aZ as h,az as w,V as C,b2 as o,a3 as l,bI as y,bJ as u,Y as n,F as D,bU as b,bO as S,bK as i,y as F,bN as Q,bM as c,B as p,b4 as A,cG as O,ch as k,dF as B,dG as U}from"./index.69621fe4.js";import{_ as z}from"./DateTimePicker.29a3e70a.js";const I={class:"text-h6"},j={class:"row"},M={class:"col-6"},N={class:"col-6 q-pl-sm"},T={class:"col-12"},G={class:"col-12 q-mt-lg"},x=V({__name:"CriarAgendamentoDialog",props:{defaultData:{type:Object,default:()=>({})}},emits:["close"],setup(v,{emit:_}){const r=v,d={nome:"",descricao:"",numero:"",data_inicial:"",data_final:""},{criarAgendamento:f}=q(),e=$(d);async function g(){await f({...e.value,data_inicial:B(e.value.data_inicial),data_final:U(e.value.data_inicial)})&&(m(),_("close")),e.value.nome="",e.value.descricao="",e.value.numero="",e.value.data_inicial=""}function m(){Object.assign(e,d)}return h(()=>r.defaultData,()=>{Object.assign(e.value,r.defaultData)},{deep:!0}),(t,s)=>(w(),C(k,null,{default:o(()=>[l(y,{class:"q-px-xs",style:{width:"900px","max-width":"90vw"}},{default:o(()=>[l(u,{class:"q-pb-sm"},{default:o(()=>[n("span",I,D(t.$t("lembrete.novo_lembrete.title")),1)]),_:1}),l(b,{inset:""}),l(S,{onSubmit:g},{default:o(()=>[l(u,{class:"q-pb-none q-pt-md"},{default:o(()=>[n("div",j,[n("div",M,[l(i,{filled:"",modelValue:e.value.nome,"onUpdate:modelValue":s[0]||(s[0]=a=>e.value.nome=a),label:t.$t("lembrete.novo_lembrete.labels.nome"),"lazy-rules":"",rules:[a=>!!a||"Campo obrigat\xF3rio"]},null,8,["modelValue","label","rules"])]),n("div",N,[l(i,{filled:"",modelValue:e.value.numero,"onUpdate:modelValue":s[1]||(s[1]=a=>e.value.numero=a),label:t.$t("lembrete.novo_lembrete.labels.numero"),mask:"##############",rules:[a=>!!a||t.$t("lembrete.novo_lembrete.labels.campo_obrigatorio")]},null,8,["modelValue","label","rules"])]),n("div",T,[l(F(z),{label:t.$t("lembrete.novo_lembrete.labels.data_horario"),modelValue:e.value.data_inicial,"onUpdate:modelValue":s[2]||(s[2]=a=>e.value.data_inicial=a)},null,8,["label","modelValue"])]),n("div",G,[l(i,{filled:"",type:"textarea",modelValue:e.value.descricao,"onUpdate:modelValue":s[3]||(s[3]=a=>e.value.descricao=a),label:t.$t("lembrete.novo_lembrete.labels.descricao"),"lazy-rules":"",rules:[a=>!!a||t.$t("lembrete.novo_lembrete.labels.campo_obrigatorio")]},null,8,["modelValue","label","rules"])])])]),_:1}),l(b,{inset:""}),l(Q,{align:"right",class:"q-pt-md q-pr-none q-pb-md q-mr-md"},{default:o(()=>[l(c,{class:p([t.$q.dark.isActive?"bg-[#2F3136] text-white":"","q-pa-sm"]),label:t.$t("lembrete.novo_lembrete.labels.salvar"),type:"submit"},null,8,["class","label"]),A(l(c,{class:p(t.$q.dark.isActive?"bg-[#2F3136] text-white":""),onClick:m,label:t.$t("lembrete.novo_lembrete.labels.cancelar")},null,8,["class","label"]),[[O]])]),_:1})]),_:1})]),_:1})]),_:1}))}});export{x as _};
