1import{A as k}from"./AuthenticatedLayout-BgPi6SK7.js";import{i as p,Z as g,r as a,f as i,a as n,w as r,b as t,d as w,l as m,v as f,o as c,F as h,j as S,t as u,p as V,g as C,m as A,e as _,T as B}from"./app-BFBm0Bhp.js";import{P as L}from"./PrimaryButton-DQRXstZk.js";import{_ as N}from"./_plugin-vue_export-helper-DlAUqK2U.js";import"./ApplicationLogo-BDZZhcqx.js";import"./NavLink-XJ1F9B8R.js";import"./TextOutline-DJTNpM16.js";import"./DocumentTextOutline-CSPECrKp.js";import"./InformationCircleOutline-B09VKpeu.js";const T={components:{PrimaryButton:L,AuthenticatedLayout:k,Head:g,Link:p},props:{school:{type:Object,default:()=>({})},atvkOptions:{type:Array,default:()=>[]}},setup(l){const o=B({school_name:l.school.school_name||"",school_code:l.school.school_code||null,atvk_code:l.school.atvk_code||"",active:!!l.school.active});return{form:o,submit:()=>{l.school.id?o.put(route("admin.schools.update",{school:l.school.id})):o.post(route("admin.schools.store"))}}}},M={class:"flex"},P={class:"font-semibold text-xl text-gray-800 leading-tight"},U={class:"py-12"},j={class:"max-w-4xl mx-auto sm:px-6 lg:px-8"},E={class:"bg-white shadow-sm sm:rounded-lg p-6"},F={class:"mb-4"},H={class:"mb-4"},O={class:"mb-4"},D=["value"],K={class:"mb-4"},Z={key:0,class:"text-red-500 text-sm"},q={class:"flex justify-end"};function z(l,o,d,e,G,I){const b=a("Head"),v=a("Link"),x=a("PrimaryButton"),y=a("AuthenticatedLayout");return c(),i(h,null,[n(b,{title:d.school.id?"Edit School":"Create School"},null,8,["title"]),n(y,null,{header:r(()=>[t("div",M,[t("h2",P,u(d.school.id?"Edit School":"Create School"),1),o[6]||(o[6]=t("div",{class:"flex-grow"},null,-1)),n(v,{class:"btn btn-secondary",href:l.route("admin.schools.index")},{default:r(()=>[...o[5]||(o[5]=[_(" Back to List ",-1)])]),_:1},8,["href"])])]),default:r(()=>[t("div",U,[t("div",j,[t("div",E,[t("form",{onSubmit:o[4]||(o[4]=w((...s)=>e.submit&&e.submit(...s),["prevent"]))},[t("div",F,[o[7]||(o[7]=t("label",{for:"school_name",class:"block text-sm font-medium text-gray-700"},"School Name",-1)),m(t("input",{"onUpdate:modelValue":o[0]||(o[0]=s=>e.form.school_name=s),id:"school_name",type:"text",class:"mt-1 block w-full border-gray-300 rounded-md shadow-sm"},null,512),[[f,e.form.school_name]])]),t("div",H,[o[8]||(o[8]=t("label",{for:"school_code",class:"block text-sm font-medium text-gray-700"},"School Code",-1)),m(t("input",{"onUpdate:modelValue":o[1]||(o[1]=s=>e.form.school_code=s),id:"school_code",type:"text",class:"mt-1 block w-full border-gray-300 rounded-md shadow-sm"},null,512),[[f,e.form.school_code,void 0,{number:!0}]])]),t("div",O,[o[10]||(o[10]=t("label",{for:"atvk_id",class:"block text-sm font-medium text-gray-700"},"ATVK",-1)),m(t("select",{"onUpdate:modelValue":o[2]||(o[2]=s=>e.form.atvk_code=s),id:"atvk_code",class:"mt-1 block w-full border-gray-300 rounded-md shadow-sm"},[o[9]||(o[9]=t("option",{value:"",disabled:""},"Select ATVK",-1)),(c(!0),i(h,null,S(d.atvkOptions,s=>(c(),i("option",{key:s.id,value:s.id},u(s.display_name),9,D))),128))],512),[[V,e.form.atvk_code]])]),t("div",K,[o[11]||(o[11]=t("label",{for:"active",class:"block text-sm font-medium text-gray-700"},"Active",-1)),m(t("input",{id:"active",type:"checkbox","onUpdate:modelValue":o[3]||(o[3]=s=>e.form.active=s),class:"form-checkbox h-5 w-5 text-indigo-600"},null,512),[[A,e.form.active]]),e.form.errors.active?(c(),i("span",Z,u(e.form.errors.active),1)):C("",!0)]),t("div",q,[n(x,{type:"submit",disabled:e.form.processing},{default:r(()=>[_(u(d.school.id?"Save Changes":"Create School"),1)]),_:1},8,["disabled"])])],32)])])])]),_:1})],64)}const eo=N(T,[["render",z]]);export{eo as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.