import{L as r}from"./Layout-DIVdUaBZ.js";import{i as m,r as p,c,b as t,d as u,t as o,a as f,w as h,o as _,e as b}from"./app-CK3cEAAe.js";import{T as g}from"./TextInput-DDvOh0mT.js";import{L as v}from"./LoadingButton-DQHYFAIm.js";import{_ as w}from"./FlashMessages-ByEdcHWZ.js";import"./moment-BywspGD9.js";import"./v4-SoommWqA.js";const x={metaInfo(){return{title:this.form.name}},components:{LoadingButton:v,TextInput:g,Link:m},layout:r,props:{template:Object},remember:"form",data(){return{editorOptions:{debug:"info",modules:{}},form:this.$inertia.form({html:this.template.html})}},methods:{onInput(e){this.form.html=e.target.innerHTML},update(){this.form.put(this.route("templates.update",this.template.id))}}},L={class:"bg-white rounded-md shadow overflow-hidden max-w-full"},y={class:"p-8 -mr-6 -mb-8 flex flex-wrap"},T={class:"pr-6 pb-8 w-full lg:w-1/3"},I={class:"font-bold text-sm mb-1"},B={class:"font-light text-sm"},H={class:"pr-6 pb-8 w-full lg:w-2/3"},M={class:"font-bold text-sm mb-1"},N={class:"font-light text-sm"},k={class:"pr-6 pb-8 w-full"},E={class:"font-bold text-sm mb-1"},V=["innerHTML"],C={class:"px-8 py-4 bg-gray-50 border-t border-gray-100 flex items-center"};function D(e,s,n,O,l,i){const d=p("loading-button");return _(),c("div",null,[t("div",L,[t("form",{onSubmit:s[1]||(s[1]=u((...a)=>i.update&&i.update(...a),["prevent"]))},[t("div",y,[t("div",T,[t("div",I,o(e.$t("Name")),1),t("div",B,o(n.template.name),1)]),t("div",H,[t("div",M,o(e.$t("Details")),1),t("div",N,o(n.template.details),1)]),t("div",k,[t("div",E,o(e.$t("Email Html")),1),t("div",{class:"editable-content",contenteditable:"true",innerHTML:n.template.html,onInput:s[0]||(s[0]=(...a)=>i.onInput&&i.onInput(...a))},null,40,V)])]),t("div",C,[f(d,{loading:l.form.processing,class:"btn-indigo ml-auto",type:"submit"},{default:h(()=>[b(o(e.$t("Update"))+" "+o(e.$t("Template")),1)]),_:1},8,["loading"])])],32)])])}const F=w(x,[["render",D]]);export{F as default};
