import{i as w,Z as y,r as m,c as u,o as i,a as n,b as s,d as c,w as d,F as v,j as U,t as f,e as C}from"./app-BhD6J0Va.js";import{L}from"./Layout-BNWXhjq5.js";import{T as S}from"./TextInput-CRQDtFka.js";import{S as k}from"./SelectInput-Cao9wiYo.js";import{L as B}from"./LoadingButton-BKJMdZnQ.js";import{_ as N}from"./FlashMessages-DW2Y2mP0.js";import"./moment-DeOISj6Y.js";import"./v4-SoommWqA.js";const _={components:{Head:y,Link:w,LoadingButton:B,SelectInput:k,TextInput:S},layout:L,props:{countries:Array,title:String},remember:"form",data(){return{form:this.$inertia.form({name:null,email:null,phone:null,address:null,city:null,region:null,country:null,postal_code:null})}},methods:{store(){this.form.post(this.route("organizations.store"))}}},x={class:"max-w-full bg-white rounded-md shadow overflow-hidden"},H={class:"flex flex-wrap -mb-8 -mr-6 p-8"},P=["value"],T={class:"flex items-center justify-end px-8 py-4 bg-gray-50 border-t border-gray-100"};function j(r,l,a,z,e,p){const b=m("Head"),t=m("text-input"),g=m("select-input"),V=m("loading-button");return i(),u("div",null,[n(b,{title:r.$t(a.title)},null,8,["title"]),s("div",x,[s("form",{onSubmit:l[8]||(l[8]=c((...o)=>p.store&&p.store(...o),["prevent"]))},[s("div",H,[n(t,{modelValue:e.form.name,"onUpdate:modelValue":l[0]||(l[0]=o=>e.form.name=o),error:e.form.errors.name,class:"pb-8 pr-6 w-full lg:w-1/2",label:r.$t("Name")},null,8,["modelValue","error","label"]),n(t,{modelValue:e.form.email,"onUpdate:modelValue":l[1]||(l[1]=o=>e.form.email=o),error:e.form.errors.email,class:"pb-8 pr-6 w-full lg:w-1/2",label:r.$t("Email")},null,8,["modelValue","error","label"]),n(t,{modelValue:e.form.phone,"onUpdate:modelValue":l[2]||(l[2]=o=>e.form.phone=o),error:e.form.errors.phone,class:"pb-8 pr-6 w-full lg:w-1/2",label:r.$t("Phone")},null,8,["modelValue","error","label"]),n(t,{modelValue:e.form.address,"onUpdate:modelValue":l[3]||(l[3]=o=>e.form.address=o),error:e.form.errors.address,class:"pb-8 pr-6 w-full lg:w-1/2",label:r.$t("Address")},null,8,["modelValue","error","label"]),n(t,{modelValue:e.form.city,"onUpdate:modelValue":l[4]||(l[4]=o=>e.form.city=o),error:e.form.errors.city,class:"pb-8 pr-6 w-full lg:w-1/2",label:r.$t("City")},null,8,["modelValue","error","label"]),n(t,{modelValue:e.form.region,"onUpdate:modelValue":l[5]||(l[5]=o=>e.form.region=o),error:e.form.errors.region,class:"pb-8 pr-6 w-full lg:w-1/2",label:"Province/State"},null,8,["modelValue","error"]),n(g,{modelValue:e.form.country,"onUpdate:modelValue":l[6]||(l[6]=o=>e.form.country=o),error:e.form.errors.country,class:"pb-8 pr-6 w-full lg:w-1/2",label:r.$t("Country")},{default:d(()=>[l[9]||(l[9]=s("option",{value:null},null,-1)),(i(!0),u(v,null,U(a.countries,o=>(i(),u("option",{key:o.id,value:o.code},f(r.$t(o.name)),9,P))),128))]),_:1},8,["modelValue","error","label"]),n(t,{modelValue:e.form.postal_code,"onUpdate:modelValue":l[7]||(l[7]=o=>e.form.postal_code=o),error:e.form.errors.postal_code,class:"pb-8 pr-6 w-full lg:w-1/2",label:r.$t("Postal code")},null,8,["modelValue","error","label"])]),s("div",T,[n(V,{loading:e.form.processing,class:"btn-indigo",type:"submit"},{default:d(()=>[C(f(r.$t("Create Organization")),1)]),_:1},8,["loading"])])],32)])])}const q=N(_,[["render",j]]);export{q as default};
