import{T as c,c as _,a,b as s,w as b,t as i,d,v as m,u as t,y as u,g as f,o as v}from"./app-13978987.js";import{_ as h}from"./RichEditor-132d6d13.js";import{_ as y}from"./SpinnerBtn-cb152833.js";import{_ as r}from"./InputFieldError-52549d23.js";import{_ as w}from"./AdminLayout-bd13ff9d.js";import{_ as V}from"./PageHeader-8c638686.js";import"./FloatingDropdown-0be3e47c.js";import"./dropdown-45d66330.js";const S={class:"container p-4 sm:p-6"},C={class:"card mx-auto w-[800px]"},U={class:"card-body"},I={class:"mb-2"},M={class:"label mb-2"},E={class:"mb-2 mt-2"},O={class:"flex gap-2"},k={class:"mb-2"},x={class:"label mb-2"},B={class:"mb-2"},D={class:"label mb-2"},T={class:"w-30 mb-2 text-nowrap"},$={class:"label mb-2"},N=s("br",null,null,-1),j={class:"mb-2 mt-3"},A={class:"mb-2 mt-10"},F={class:"mb-2"},G={class:"mb-2"},L={class:"mb-2 mt-2"},P={class:"mb-2 mt-2"},q={class:"mb-2 mt-3"},z={for:"toggle-status",class:"toggle toggle-sm"},H=s("div",{class:"toggle-body"},null,-1),J={class:"label label-md"},K={class:"mb-2 mt-3"},Q={for:"toggle-featured-status",class:"toggle toggle-sm"},R=s("div",{class:"toggle-body"},null,-1),W={class:"label label-md"},X={class:"mb-2"},Y=f({layout:w}),is=Object.assign(Y,{__name:"Create",props:["buttons","segments"],setup(p){const e=c({title:"",preview:"",preview_2:"",bg_color:"#ffffff",short_description:"",long_description:"",is_featured:!1,is_active:!0,seo:{title:"",image:"",description:"",tags:""}}),g=()=>{e.post(route("admin.integrations.store"),{onSuccess:()=>{e.reset()}})};return(n,l)=>(v(),_("main",S,[a(V,{title:"Create Integration",buttons:p.buttons},null,8,["buttons"]),s("div",C,[s("div",U,[s("form",{onSubmit:b(g,["prevent"])},[s("div",I,[s("label",M,i(n.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]]),a(r,{message:t(e).errors.title},null,8,["message"])]),s("div",E,[s("label",null,i(n.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]]),a(r,{message:t(e).errors.short_description},null,8,["message"])]),s("div",O,[s("div",k,[s("label",x,i(n.trans("Preview Image")),1),s("input",{type:"file",onChange:l[2]||(l[2]=o=>t(e).preview=o.target.files[0]),class:"input"},null,32),a(r,{message:t(e).errors.preview},null,8,["message"])]),s("div",B,[s("label",D,i(n.trans("Banner Image")),1),s("input",{type:"file",onChange:l[3]||(l[3]=o=>t(e).preview_2=o.target.files[0]),class:"input"},null,32),a(r,{message:t(e).errors.preview_2},null,8,["message"])]),s("div",T,[s("label",$,i(n.trans("Icon BG Color")),1),N,d(s("input",{type:"color","onUpdate:modelValue":l[4]||(l[4]=o=>t(e).bg_color=o),class:"h-8 w-16"},null,512),[[m,t(e).bg_color]]),a(r,{message:t(e).errors.bg_color},null,8,["message"])])]),s("div",j,[s("label",null,i(n.trans("Long Description")),1),a(h,{modelValue:t(e).long_description,"onUpdate:modelValue":l[5]||(l[5]=o=>t(e).long_description=o)},null,8,["modelValue"]),a(r,{message:t(e).errors.long_description},null,8,["message"])]),s("h6",A,i(n.trans("SEO Settings")),1),s("div",F,[s("label",null,i(n.trans("SEO Meta Title")),1),d(s("input",{"onUpdate:modelValue":l[6]||(l[6]=o=>t(e).seo.title=o),type:"text",class:"input"},null,512),[[m,t(e).seo.title]]),a(r,{message:t(e).errors["seo.title"]},null,8,["message"])]),s("div",G,[s("label",null,i(n.trans("SEO Meta Image")),1),s("input",{onChange:l[7]||(l[7]=o=>t(e).seo.image=o.target.files[0]),type:"file",class:"input",accept:"image/*"},null,32),a(r,{message:t(e).errors["seo.image"]},null,8,["message"])]),s("div",L,[s("label",null,i(n.trans("SEO Meta Description")),1),d(s("textarea",{"onUpdate:modelValue":l[8]||(l[8]=o=>t(e).seo.description=o),class:"input h-100"},null,512),[[m,t(e).seo.description]]),a(r,{message:t(e).errors["seo.description"]},null,8,["message"])]),s("div",P,[s("label",null,i(n.trans("SEO Meta Tags")),1),d(s("input",{"onUpdate:modelValue":l[9]||(l[9]=o=>t(e).seo.tags=o),type:"text",class:"input"},null,512),[[m,t(e).seo.tags]]),a(r,{message:t(e).errors["seo.tags"]},null,8,["message"])]),s("div",q,[s("div",null,[s("label",z,[d(s("input",{"onUpdate:modelValue":l[10]||(l[10]=o=>t(e).is_active=o),class:"toggle-input peer sr-only",id:"toggle-status",type:"checkbox"},null,512),[[u,t(e).is_active]]),H,s("span",J,i(n.trans("Is Active?")),1)])])]),s("div",K,[s("div",null,[s("label",Q,[d(s("input",{"onUpdate:modelValue":l[11]||(l[11]=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]]),R,s("span",W,i(n.trans("Is Featured?")),1)])])]),s("div",X,[a(y,{classes:"btn btn-primary",processing:t(e).processing,"btn-text":n.trans("Create")},null,8,["processing","btn-text"])])],32)])])]))}});export{is as default};
