import{L as c}from"./Layout-DIVdUaBZ.js";import{i as y,r as a,c as b,b as e,a as d,w as l,e as m,t as r,d as h,o as g}from"./app-CK3cEAAe.js";import{T as x}from"./TextInput-DDvOh0mT.js";import{L as _}from"./LoadingButton-DQHYFAIm.js";import{_ as w}from"./FlashMessages-ByEdcHWZ.js";import"./moment-BywspGD9.js";import"./v4-SoommWqA.js";const v={metaInfo(){return{title:this.form.name}},components:{LoadingButton:_,TextInput:x,Link:y},layout:c,props:{city:Object},remember:"form",data(){return{form:this.$inertia.form({name:this.city.name})}},created(){},methods:{update(){this.form.put(this.route("cities.update",this.city.id))},destroy(){confirm("Are you sure you want to delete this city?")&&this.$inertia.delete(this.route("cities.destroy",this.city.id))}}},L={class:"mb-8 font-bold text-3xl"},k={class:"bg-white rounded-md shadow overflow-hidden max-w-3xl"},C={class:"p-8 -mr-6 -mb-8 flex flex-wrap"},V={class:"px-8 py-4 bg-gray-50 border-t border-gray-100 flex items-center"};function B(o,t,N,T,i,n){const u=a("Link"),p=a("text-input"),f=a("loading-button");return g(),b("div",null,[e("h1",L,[d(u,{class:"text-indigo-400 hover:text-indigo-600",href:this.route("cities")},{default:l(()=>[m(r(o.$t("City")),1)]),_:1},8,["href"]),t[3]||(t[3]=e("span",{class:"text-indigo-400 font-medium"},"/",-1)),m(" "+r(i.form.name),1)]),e("div",k,[e("form",{onSubmit:t[2]||(t[2]=h((...s)=>n.update&&n.update(...s),["prevent"]))},[e("div",C,[d(p,{modelValue:i.form.name,"onUpdate:modelValue":t[0]||(t[0]=s=>i.form.name=s),error:i.form.errors.name,class:"pr-6 pb-8 w-full lg:w-1/2",label:o.$t("Name")},null,8,["modelValue","error","label"])]),e("div",V,[e("button",{class:"text-red-600 hover:underline",tabindex:"-1",type:"button",onClick:t[1]||(t[1]=(...s)=>n.destroy&&n.destroy(...s))},r(o.$t("Delete"))+" "+r(o.$t("City")),1),d(f,{loading:i.form.processing,class:"btn-indigo ml-auto",type:"submit"},{default:l(()=>[m(r(o.$t("Update"))+" "+r(o.$t("City")),1)]),_:1},8,["loading"])])],32)])])}const A=w(v,[["render",B]]);export{A as default};
