import{u as f,s as U,t as v,r as i,o as b,k as D,l as c,d,f as l,e as r,L as $,a as B,F}from"./app-44623493.js";const P={class:"grid grid-cols-2 gap-6"},k={class:"col-span-2"},A={class:"col-span-2 sm:col-span-1"},E={class:"col-span-2 sm:col-span-1"},j={class:"col-span-2"},H={name:"TodoForm"},O=Object.assign(H,{setup(T){const u=f(),s={title:"",dueDate:null,dueTime:null,description:""},m="utility/todo/",n=U(m),o=v({...s}),p=a=>{var e;Object.assign(s,{...a,dueDate:a.dueDate.value,dueTime:(e=a.dueTime)==null?void 0:e.at}),Object.assign(o,$(s))};return(a,e)=>{const g=i("BaseInput"),_=i("DatePicker"),V=i("BaseEditor"),y=i("FormAction");return b(),D(y,{"init-url":m,"init-form":s,form:o,"set-form":p,redirect:"UtilityTodo"},{default:c(()=>[d("div",P,[d("div",k,[l(g,{type:"text",modelValue:o.title,"onUpdate:modelValue":e[0]||(e[0]=t=>o.title=t),name:"title",label:a.$trans("utility.todo.props.title"),error:r(n).title,"onUpdate:error":e[1]||(e[1]=t=>r(n).title=t),autofocus:""},null,8,["modelValue","label","error"])]),d("div",A,[l(_,{modelValue:o.dueDate,"onUpdate:modelValue":e[2]||(e[2]=t=>o.dueDate=t),name:"dueDate",label:a.$trans("utility.todo.props.due_date"),"no-clear":"",error:r(n).dueDate,"onUpdate:error":e[3]||(e[3]=t=>r(n).dueDate=t)},null,8,["modelValue","label","error"])]),d("div",E,[l(_,{modelValue:o.dueTime,"onUpdate:modelValue":e[4]||(e[4]=t=>o.dueTime=t),name:"dueTime",label:a.$trans("utility.todo.props.due_time"),as:"time",error:r(n).dueTime,"onUpdate:error":e[5]||(e[5]=t=>r(n).dueTime=t)},null,8,["modelValue","label","error"])]),d("div",j,[l(V,{id:"Testing",modelValue:o.description,"onUpdate:modelValue":e[6]||(e[6]=t=>o.description=t),name:"description",edit:!!r(u).params.uuid,label:a.$trans("utility.todo.props.description"),error:r(n).description,"onUpdate:error":e[7]||(e[7]=t=>r(n).description=t)},null,8,["modelValue","edit","label","error"])])])]),_:1},8,["form"])}}}),C={name:"TodoAction"},L=Object.assign(C,{setup(T){const u=f();return(s,m)=>{const n=i("PageHeaderAction"),o=i("PageHeader"),p=i("ParentTransition");return b(),B(F,null,[l(o,{title:s.$trans(r(u).meta.trans,{attribute:s.$trans(r(u).meta.label)}),navs:[{label:s.$trans("utility.todo.todo"),path:"UtilityTodoList"}]},{default:c(()=>[l(n,{name:"UtilityTodo",title:s.$trans("utility.todo.todo"),actions:["list"]},null,8,["title"])]),_:1},8,["title","navs"]),l(p,{appear:"",visibility:!0},{default:c(()=>[l(O)]),_:1})],64)}}});export{L as default};
