import{u as y,s as U,t as _,r as i,o as g,k as b,l as f,d,f as l,e as r,b as F,L as D,a as P,F as k}from"./app-44623493.js";const A={class:"grid grid-cols-3 gap-6"},L={class:"col-span-3 sm:col-span-1"},j={class:"col-span-3 sm:col-span-1"},H={class:"col-span-3 sm:col-span-1"},O={class:"col-span-3 sm:col-span-1"},S={name:"CompanyDesignationForm"},T=Object.assign(S,{setup(V){const c=y(),t={name:"",alias:"",parent:"",description:""},u="company/designation/",s=U(u),n=_({...t}),p=_({parent:"",isLoaded:!c.params.uuid}),$=o=>{var e,m;Object.assign(t,{name:o.name,alias:o.alias,description:o.description,parent:(e=o.parent)==null?void 0:e.uuid}),Object.assign(n,D(t)),p.parent=(m=o.parent)==null?void 0:m.uuid,p.isLoaded=!0};return(o,e)=>{const m=i("BaseInput"),v=i("BaseSelectSearch"),B=i("BaseTextarea"),C=i("FormAction");return g(),b(C,{"init-url":u,"init-form":t,form:n,"set-form":$,redirect:"CompanyDesignation"},{default:f(()=>[d("div",A,[d("div",L,[l(m,{type:"text",modelValue:n.name,"onUpdate:modelValue":e[0]||(e[0]=a=>n.name=a),name:"name",label:o.$trans("company.designation.props.name"),error:r(s).name,"onUpdate:error":e[1]||(e[1]=a=>r(s).name=a),autofocus:""},null,8,["modelValue","label","error"])]),d("div",j,[l(m,{type:"text",modelValue:n.alias,"onUpdate:modelValue":e[2]||(e[2]=a=>n.alias=a),name:"alias",label:o.$trans("company.designation.props.alias"),error:r(s).alias,"onUpdate:error":e[3]||(e[3]=a=>r(s).alias=a),autofocus:""},null,8,["modelValue","label","error"])]),d("div",H,[p.isLoaded?(g(),b(v,{key:0,name:"parent",label:o.$trans("global.select",{attribute:o.$trans("company.designation.props.parent")}),modelValue:n.parent,"onUpdate:modelValue":e[4]||(e[4]=a=>n.parent=a),error:r(s).parent,"onUpdate:error":e[5]||(e[5]=a=>r(s).parent=a),"init-search":p.parent,"search-action":"company/designation/list"},null,8,["label","modelValue","error","init-search"])):F("",!0)]),d("div",O,[l(B,{modelValue:n.description,"onUpdate:modelValue":e[6]||(e[6]=a=>n.description=a),name:"description",label:o.$trans("company.designation.props.description"),error:r(s).description,"onUpdate:error":e[7]||(e[7]=a=>r(s).description=a)},null,8,["modelValue","label","error"])])])]),_:1},8,["form"])}}}),E={name:"CompanyDesignationAction"},I=Object.assign(E,{setup(V){const c=y();return(t,u)=>{const s=i("PageHeaderAction"),n=i("PageHeader"),p=i("ParentTransition");return g(),P(k,null,[l(n,{title:t.$trans(r(c).meta.trans,{attribute:t.$trans(r(c).meta.label)}),navs:[{label:t.$trans("company.company"),path:"Company"},{label:t.$trans("company.designation.designation"),path:"CompanyDesignationList"}]},{default:f(()=>[l(s,{name:"CompanyDesignation",title:t.$trans("company.designation.designation"),actions:["list"]},null,8,["title"])]),_:1},8,["title","navs"]),l(p,{appear:"",visibility:!0},{default:f(()=>[l(T)]),_:1})],64)}}});export{I as default};
