import{m as c,l as b,c as _,a as m,b as e,t as i,d,v as r,y as g,w as v,g as f,o as h,O as y}from"./app-13978987.js";import{_ as V}from"./AdminLayout-bd13ff9d.js";import{_ as q}from"./PageHeader-8c638686.js";import{_ as M}from"./SpinnerBtn-cb152833.js";import{_ as O}from"./RichEditor-132d6d13.js";import"./dropdown-45d66330.js";import"./FloatingDropdown-0be3e47c.js";const S={class:"container p-4 sm:p-6"},T={class:"card"},U={class:"card-body space-y-5"},k={class:"label label-required mb-1"},x={class:"label label-required mb-1"},E={class:"mb-2"},D={class:"label label-required mb-1"},P={class:"mb-2 mt-2"},$={class:"label label-required mb-1"},w={class:"mb-2 mt-3"},B={class:"label label-required mb-1"},C={class:"mb-2 mt-3"},N={for:"toggle-status",class:"toggle toggle-sm"},j=e("div",{class:"toggle-body"},null,-1),z={class:"label label-md"},A=f({layout:V}),Q=Object.assign(A,{__name:"Edit",props:["info","seo"],setup(o){const n=o,u=c(!1),a=c({meta_title:"",meta_description:"",meta_tags:""});b(()=>{a.value.meta_title=n.seo.title,a.value.meta_description=n.seo.description,a.value.meta_tags=n.seo.tags});const p=()=>{const l={...a.value,...n.info};u.value=!0,y.patch(route("admin.page.update",n.info.id),l)};return(l,t)=>(h(),_("main",S,[m(q),e("form",{method:"post",onSubmit:v(p,["prevent"])},[e("div",T,[e("div",U,[e("div",null,[e("label",k,i(l.trans("Page Title")),1),d(e("input",{type:"text",name:"title","onUpdate:modelValue":t[0]||(t[0]=s=>o.info.title=s),required:"",class:"input"},null,512),[[r,o.info.title]])]),e("div",null,[e("label",x,i(l.trans("Page Description")),1),m(O,{modelValue:o.info.description.value,"onUpdate:modelValue":t[1]||(t[1]=s=>o.info.description.value=s)},null,8,["modelValue"])]),e("div",E,[e("label",D,i(l.trans("SEO Meta Title")),1),d(e("input",{"onUpdate:modelValue":t[2]||(t[2]=s=>a.value.meta_title=s),type:"text",name:"meta_title",required:"",class:"input"},null,512),[[r,a.value.meta_title]])]),e("div",P,[e("label",$,i(l.trans("SEO Meta Description")),1),d(e("textarea",{"onUpdate:modelValue":t[3]||(t[3]=s=>a.value.meta_description=s),name:"meta_description",required:"",class:"textarea"},null,512),[[r,a.value.meta_description]])]),e("div",w,[e("label",B,i(l.trans("SEO Meta Tags")),1),d(e("input",{"onUpdate:modelValue":t[4]||(t[4]=s=>a.value.meta_tags=s),type:"text",name:"meta_tags",required:"",class:"input"},null,512),[[r,a.value.meta_tags]])]),e("div",C,[e("div",null,[e("label",N,[d(e("input",{"onUpdate:modelValue":t[5]||(t[5]=s=>o.info.status=s),class:"toggle-input peer sr-only",id:"toggle-status",type:"checkbox"},null,512),[[g,o.info.status]]),j,e("span",z,i(l.trans("Make it publish?")),1)])])]),m(M,{processing:u.value,btnText:l.trans("Save Changes")},null,8,["processing","btnText"])])])],32)]))}});export{Q as default};
