import{u as b,t as g,s as B,r as d,o as V,k as P,l as y,d as p,f as s,e as n,L as T,a as F,F as k}from"./app-44623493.js";const C={class:"grid grid-cols-3 gap-6"},j={class:"col-span-3 sm:col-span-1"},O={class:"col-span-3 sm:col-span-1"},S={class:"col-span-3 sm:col-span-1"},q={class:"col-span-3 sm:col-span-1"},H={class:"col-span-3 sm:col-span-2"},R={class:"col-span-3"},E={name:"AttendanceTypeForm"},I=Object.assign(E,{setup(f){b();const i={name:"",code:"",color:"",category:"",alias:"",description:""},l="attendance/type/",c=g({attendanceCategories:[]}),a=B(l),o=g({...i}),m=r=>{Object.assign(c,r)},_=r=>{var e;Object.assign(i,{...r,category:(e=r.category)==null?void 0:e.value}),Object.assign(o,T(i))};return(r,e)=>{const v=d("BaseSelect"),u=d("BaseInput"),U=d("SelectedColorPicker"),$=d("BaseTextarea"),A=d("FormAction");return V(),P(A,{"pre-requisites":!0,onSetPreRequisites:m,"init-url":l,"init-form":i,form:o,"set-form":_,redirect:"AttendanceType"},{default:y(()=>[p("div",C,[p("div",j,[s(v,{modelValue:o.category,"onUpdate:modelValue":e[0]||(e[0]=t=>o.category=t),name:"category",label:r.$trans("attendance.type.props.category"),options:c.attendanceCategories,error:n(a).category,"onUpdate:error":e[1]||(e[1]=t=>n(a).category=t)},null,8,["modelValue","label","options","error"])]),p("div",O,[s(u,{type:"text",modelValue:o.name,"onUpdate:modelValue":e[2]||(e[2]=t=>o.name=t),name:"name",label:r.$trans("attendance.type.props.name"),error:n(a).name,"onUpdate:error":e[3]||(e[3]=t=>n(a).name=t),autofocus:""},null,8,["modelValue","label","error"])]),p("div",S,[s(u,{type:"text",modelValue:o.alias,"onUpdate:modelValue":e[4]||(e[4]=t=>o.alias=t),name:"alias",label:r.$trans("attendance.type.props.alias"),error:n(a).alias,"onUpdate:error":e[5]||(e[5]=t=>n(a).alias=t)},null,8,["modelValue","label","error"])]),p("div",q,[s(u,{type:"text",modelValue:o.code,"onUpdate:modelValue":e[6]||(e[6]=t=>o.code=t),name:"code",label:r.$trans("attendance.type.props.code"),error:n(a).code,"onUpdate:error":e[7]||(e[7]=t=>n(a).code=t),autofocus:""},null,8,["modelValue","label","error"])]),p("div",H,[s(U,{modelValue:o.color,"onUpdate:modelValue":e[8]||(e[8]=t=>o.color=t),label:r.$trans("general.color"),error:n(a).color,"onUpdate:error":e[9]||(e[9]=t=>n(a).color=t)},null,8,["modelValue","label","error"])]),p("div",R,[s($,{modelValue:o.description,"onUpdate:modelValue":e[10]||(e[10]=t=>o.description=t),name:"description",label:r.$trans("attendance.type.props.description"),error:n(a).description,"onUpdate:error":e[11]||(e[11]=t=>n(a).description=t)},null,8,["modelValue","label","error"])])])]),_:1},8,["form"])}}}),L={name:"AttendanceTypeAction"},w=Object.assign(L,{setup(f){const i=b();return(l,c)=>{const a=d("PageHeaderAction"),o=d("PageHeader"),m=d("ParentTransition");return V(),F(k,null,[s(o,{title:l.$trans(n(i).meta.trans,{attribute:l.$trans(n(i).meta.label)}),navs:[{label:l.$trans("attendance.attendance"),path:"Attendance"},{label:l.$trans("attendance.type.type"),path:"AttendanceTypeList"}]},{default:y(()=>[s(a,{name:"AttendanceType",title:l.$trans("attendance.type.type"),actions:["list"]},null,8,["title"])]),_:1},8,["title","navs"]),s(m,{appear:"",visibility:!0},{default:y(()=>[s(I)]),_:1})],64)}}});export{w as default};
