import{i as f,Z as b,r as i,c as g,a as r,b as a,d as _,w as v,o as h,e as w,t as C}from"./app-CK3cEAAe.js";import{L}from"./Layout-DIVdUaBZ.js";import{T}from"./TextInput-DDvOh0mT.js";import{L as k}from"./LoadingButton-DQHYFAIm.js";import{_ as x,C as y,B as V,E as B,I,M as U,P as E,U as S,H,a as M,L as N,b as O,T as P,c as R,d as A,e as F,f as Q,g as m}from"./UploadAdapter-DaiRSwB-.js";import{_ as j}from"./FlashMessages-ByEdcHWZ.js";import"./moment-BywspGD9.js";import"./v4-SoommWqA.js";const D={metaInfo:{title:"Contact"},components:{Link:f,Head:b,TextInput:T,LoadingButton:k,Ckeditor:x},layout:L,props:{page:Object},remember:"form",data(){return{editor:y,editorConfig:{plugins:[V,B,I,U,E,S,H,M,N,O,P,R,A,F,Q],toolbar:["heading","|","bold","italic","link","bulletedList","numberedList","|","outdent","indent","|","insertTable","blockQuote","|","imageUpload","mediaEmbed","|","undo","redo"],table:{toolbar:["tableColumn","tableRow","mergeTableCells"]},extraPlugins:[function(e){e.plugins.get("FileRepository").createUploadAdapter=l=>new m(l)}]},tabs:[{name:"Overview",active:!0},{name:"List Information",active:!1},{name:"Bottom",active:!1}],form:this.$inertia.form({title:"Terms of Services",slug:"terms",is_active:this.page.is_active,html:JSON.parse(this.page.html)})}},methods:{update(){this.form.put(this.route("front_pages.update","terms"))},uploader(t){t.plugins.get("FileRepository").createUploadAdapter=e=>new m(e)},activeTab(t){for(const e of this.tabs)e.active=!1;this.tabs[t].active=!0}},mounted(){}},J={class:"bg-white rounded-md shadow overflow-hidden mr-2"},Z={class:"p-8 -mr-6 -mb-8 flex flex-wrap"},$={class:"pr-6 pb-8 w-full"},q={class:"px-8 py-4 bg-gray-50 border-t border-gray-100 flex items-center"};function z(t,e,l,G,o,n){const d=i("Head"),p=i("text-input"),u=i("ckeditor"),c=i("loading-button");return h(),g("div",null,[r(d,{title:t.$t("terms_of_services")},null,8,["title"]),a("div",J,[a("form",{onSubmit:e[2]||(e[2]=_((...s)=>n.update&&n.update(...s),["prevent"]))},[a("div",Z,[r(p,{modelValue:o.form.html.title,"onUpdate:modelValue":e[0]||(e[0]=s=>o.form.html.title=s),class:"pr-6 pb-8 w-full lg:w-1/2",label:t.$t("Title")},null,8,["modelValue","label"]),a("div",$,[e[3]||(e[3]=a("label",{class:"form-label"},"Page Content:",-1)),r(u,{editor:o.editor,modelValue:o.form.html.content,"onUpdate:modelValue":e[1]||(e[1]=s=>o.form.html.content=s),config:o.editorConfig},null,8,["editor","modelValue","config"])])]),a("div",q,[r(c,{loading:o.form.processing,class:"btn-indigo ml-auto",type:"submit"},{default:v(()=>[w(C(t.$t("Save")),1)]),_:1},8,["loading"])])],32)])])}const se=j(D,[["render",z]]);export{se as default};
