import{d as p,T as u,c,o as _,a as e,b as r,l as n,t as i,v as d,u as a,B as b,x as g,E as f}from"./app-Do7K7VDV.js";import{_ as v}from"./AdminLayout-DeT_GLTC.js";import{_ as h}from"./SpinnerBtn-C-rqKjUt.js";import{_ as y}from"./RichEditor-CXkSpnD_.js";import"./AssetModal-C18ToIEK.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";import"./InputFieldError-0BmYlL24.js";import"./ToastrContainer-CtYDvNPN.js";const V={class:"card"},q={class:"card-body space-y-5"},M={class:"mb-2"},T={class:"label label-required mb-1"},x={class:"mb-2"},S={class:"label label-required mb-1"},U={class:"mb-2"},k={class:"label label-required mb-1"},E={class:"col-lg-12"},B={class:"mb-2 mt-2"},C={class:"label label-required mb-1"},D={class:"col-lg-12"},O={class:"mb-2 mt-3"},P={class:"label label-required mb-1"},$={class:"col-lg-12"},w={class:"mb-2 mt-3"},N={for:"toggle-status",class:"toggle toggle-sm"},j={class:"label label-md"},z=p({layout:v}),R=Object.assign(z,{__name:"Create",props:["buttons","segments"],setup(A){const t=u({title:"",description:"",meta_title:"",meta_description:"",meta_tags:"",status:!1}),m=()=>{t.post(route("admin.page.store"),{onSuccess:()=>{t.reset(),f.success(trans("Page has been added successfully"))}})};return(o,s)=>(_(),c("form",{method:"post",onSubmit:g(m,["prevent"])},[e("div",V,[e("div",q,[e("div",M,[e("label",T,i(o.trans("Page Title")),1),n(e("input",{type:"text",name:"title","onUpdate:modelValue":s[0]||(s[0]=l=>a(t).title=l),required:"",class:"input"},null,512),[[d,a(t).title]])]),e("div",x,[e("label",S,i(o.trans("Page Description")),1),r(y,{modelValue:a(t).description,"onUpdate:modelValue":s[1]||(s[1]=l=>a(t).description=l)},null,8,["modelValue"])]),e("div",U,[e("label",k,i(o.trans("SEO Meta Title")),1),e("div",E,[n(e("input",{"onUpdate:modelValue":s[2]||(s[2]=l=>a(t).meta_title=l),type:"text",name:"meta_title",required:"",class:"input"},null,512),[[d,a(t).meta_title]])])]),e("div",B,[e("label",C,i(o.trans("SEO Meta Description")),1),e("div",D,[n(e("textarea",{"onUpdate:modelValue":s[3]||(s[3]=l=>a(t).meta_description=l),name:"meta_description",required:"",class:"textarea"},null,512),[[d,a(t).meta_description]])])]),e("div",O,[e("label",P,i(o.trans("SEO Meta Tags")),1),e("div",$,[n(e("input",{"onUpdate:modelValue":s[4]||(s[4]=l=>a(t).meta_tags=l),type:"text",name:"meta_tags",required:"",class:"input"},null,512),[[d,a(t).meta_tags]])])]),e("div",w,[e("div",null,[e("label",N,[n(e("input",{"onUpdate:modelValue":s[5]||(s[5]=l=>a(t).status=l),class:"toggle-input peer sr-only",id:"toggle-status",type:"checkbox"},null,512),[[b,a(t).status]]),s[6]||(s[6]=e("div",{class:"toggle-body"},null,-1)),e("span",j,i(o.trans("Make it publish?")),1)])])]),r(h,{processing:a(t).processing,btnText:o.trans("Create")},null,8,["processing","btnText"])])])],32))}});export{R as default};
