import{d as g,T as b,c,o as _,a as s,x as v,l as d,b as n,t as i,v as m,u as t,B as u}from"./app-Do7K7VDV.js";import{_ as f}from"./AdminLayout-DeT_GLTC.js";import{_ as y}from"./SpinnerBtn-C-rqKjUt.js";import{_ as h}from"./RichEditor-CXkSpnD_.js";import{_ as r}from"./InputFieldError-0BmYlL24.js";import"./AssetModal-C18ToIEK.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";import"./ToastrContainer-CtYDvNPN.js";const V={class:"card mx-auto max-w-3xl"},S={class:"card-body"},w={class:"mb-2"},U={class:"label mb-2"},C={class:"mb-2 mt-2"},M={class:"grid grid-cols-2 gap-2"},x={class:"mb-2"},E={class:"label mb-2"},O={class:"mb-2"},k={class:"label mb-2"},B={class:"mb-2 mt-3"},D={class:"mb-2 mt-10"},T={class:"mb-2"},$={class:"mb-2"},I={class:"mb-2 mt-2"},N={class:"mb-2 mt-2"},P={class:"mb-2 mt-3"},j={for:"toggle-status",class:"toggle toggle-sm"},A={class:"label label-md"},F={class:"mb-2 mt-3"},G={for:"toggle-featured-status",class:"toggle toggle-sm"},L={class:"label label-md"},q={class:"mb-2"},z=g({layout:f}),ss=Object.assign(z,{__name:"Create",setup(H){const e=b({title:"",preview:"",bg_color:"#ff0",short_description:"",long_description:"",is_featured:!1,is_active:!0,seo:{title:"",image:"",description:"",tags:""}}),p=()=>{e.post(route("admin.integrations.store"),{onSuccess:()=>{e.reset()}})};return(a,l)=>(_(),c("div",V,[s("div",S,[s("form",{onSubmit:v(p,["prevent"])},[s("div",w,[s("label",U,i(a.trans("Title")),1),d(s("input",{type:"text","onUpdate:modelValue":l[0]||(l[0]=o=>t(e).title=o),class:"input"},null,512),[[m,t(e).title]]),n(r,{message:t(e).errors.title},null,8,["message"])]),s("div",C,[s("label",null,i(a.trans("Short Description")),1),d(s("textarea",{"onUpdate:modelValue":l[1]||(l[1]=o=>t(e).short_description=o),name:"short_description",class:"textarea",maxlength:"500"},null,512),[[m,t(e).short_description]]),n(r,{message:t(e).errors.short_description},null,8,["message"])]),s("div",M,[s("div",x,[s("label",E,i(a.trans("Preview")),1),s("input",{type:"file",onChange:l[2]||(l[2]=o=>t(e).preview=o.target.files[0]),class:"input"},null,32),n(r,{message:t(e).errors.preview},null,8,["message"])]),s("div",O,[s("label",k,i(a.trans("Preview BG Color")),1),l[11]||(l[11]=s("br",null,null,-1)),d(s("input",{type:"color","onUpdate:modelValue":l[3]||(l[3]=o=>t(e).bg_color=o),class:"h-8 w-16"},null,512),[[m,t(e).bg_color]]),n(r,{message:t(e).errors.bg_color},null,8,["message"])])]),s("div",B,[s("label",null,i(a.trans("Long Description")),1),n(h,{modelValue:t(e).long_description,"onUpdate:modelValue":l[4]||(l[4]=o=>t(e).long_description=o)},null,8,["modelValue"]),n(r,{message:t(e).errors.long_description},null,8,["message"])]),s("h6",D,i(a.trans("SEO Settings")),1),s("div",T,[s("label",null,i(a.trans("SEO Meta Title")),1),d(s("input",{"onUpdate:modelValue":l[5]||(l[5]=o=>t(e).seo.title=o),type:"text",class:"input"},null,512),[[m,t(e).seo.title]]),n(r,{message:t(e).errors["seo.title"]},null,8,["message"])]),s("div",$,[s("label",null,i(a.trans("SEO Meta Image")),1),s("input",{onChange:l[6]||(l[6]=o=>t(e).seo.image=o.target.files[0]),type:"file",class:"input",accept:"image/*"},null,32),n(r,{message:t(e).errors["seo.image"]},null,8,["message"])]),s("div",I,[s("label",null,i(a.trans("SEO Meta Description")),1),d(s("textarea",{"onUpdate:modelValue":l[7]||(l[7]=o=>t(e).seo.description=o),class:"input h-100"},null,512),[[m,t(e).seo.description]]),n(r,{message:t(e).errors["seo.description"]},null,8,["message"])]),s("div",N,[s("label",null,i(a.trans("SEO Meta Tags")),1),d(s("input",{"onUpdate:modelValue":l[8]||(l[8]=o=>t(e).seo.tags=o),type:"text",class:"input"},null,512),[[m,t(e).seo.tags]]),n(r,{message:t(e).errors["seo.tags"]},null,8,["message"])]),s("div",P,[s("div",null,[s("label",j,[d(s("input",{"onUpdate:modelValue":l[9]||(l[9]=o=>t(e).is_active=o),class:"toggle-input peer sr-only",id:"toggle-status",type:"checkbox"},null,512),[[u,t(e).is_active]]),l[12]||(l[12]=s("div",{class:"toggle-body"},null,-1)),s("span",A,i(a.trans("Is Active?")),1)])])]),s("div",F,[s("div",null,[s("label",G,[d(s("input",{"onUpdate:modelValue":l[10]||(l[10]=o=>t(e).is_featured=o),class:"toggle-input peer sr-only",id:"toggle-featured-status",type:"checkbox"},null,512),[[u,t(e).is_featured]]),l[13]||(l[13]=s("div",{class:"toggle-body"},null,-1)),s("span",L,i(a.trans("Is Featured?")),1)])])]),s("div",q,[n(y,{classes:"btn btn-primary",processing:t(e).processing,"btn-text":a.trans("Create")},null,8,["processing","btn-text"])])],32)])]))}});export{ss as default};
