import{Z as f,i as b,r as i,c as g,o as _,a as r,b as a,d as v,w as h,e as w,t as C}from"./app-BhD6J0Va.js";import{L}from"./Layout-BNWXhjq5.js";import{T}from"./TextInput-CRQDtFka.js";import{L as k}from"./LoadingButton-BKJMdZnQ.js";import{_ as x,g as m,B as y,E as V,I as B,M as I,P as U,U as E,H as S,a as H,L as M,b as N,T as O,c as P,d as R,e as A,f as F,C as Q}from"./UploadAdapter-tSvJccAf.js";import{_ as j}from"./FlashMessages-DW2Y2mP0.js";import"./moment-DeOISj6Y.js";import"./v4-SoommWqA.js";const D={metaInfo:{title:"Contact"},components:{Link:b,Head:f,TextInput:T,LoadingButton:k,Ckeditor:x},layout:L,props:{page:Object},remember:"form",data(){return{editor:Q,editorConfig:{plugins:[y,V,B,I,U,E,S,H,M,N,O,P,R,A,F],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 _(),g("div",null,[r(d,{title:t.$t("terms_of_services")},null,8,["title"]),a("div",J,[a("form",{onSubmit:e[2]||(e[2]=v((...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:h(()=>[w(C(t.$t("Save")),1)]),_:1},8,["loading"])])],32)])])}const se=j(D,[["render",z]]);export{se as default};
