import{_ as w}from"./D_7E8SMU.js";import{_ as C}from"./BOhf1Bbf.js";import{N as B,s as j,j as S,d as V,e as i,w as D,m as s,o as d,b as a,G as p,c,t as l,D as m,I as g,f as y}from"./Bgmy51Qv.js";import{u as K}from"./DKgjlGGV.js";import"./CNIrc0EA.js";import"./DZl4_Bww.js";import"./AmaTRG5a.js";import"./BHvLfWtM.js";import"./DuSynPle.js";import"./B2895E6R.js";import"./7pZkuj9N.js";const N={class:"input-wrapper"},P=["placeholder"],R={key:0,class:"error"},q={class:"input-wrapper"},I=["placeholder"],L={key:0,class:"error"},O={class:"input-wrapper"},T={class:"dply-felx j-left mb-20 mb-sm-15"},U={class:"mr-15"},z={class:"input-wrapper"},G={class:"dply-felx j-left mb-20 mb-sm-15"},M={class:"mr-15"},se={__name:"[id]",setup(A){const _=B(),{currentLanguage:F}=j(_),t=S({id:"",title:"",slug:"",featured:2,status:2,image:""}),{statusObj:f,featuredObj:v}=K(),b=e=>{t.value.featured=e.key},$=e=>{t.value.status=e.key},h=e=>{t.value=e};return(e,o)=>{const u=w,k=C;return e.$can("brand","create")||e.$can("brand","view")?(d(),V(k,{key:0,ref:"dataPage","set-api":"setBrand","get-api":"getBrand","empty-store-variable":"allBrands","set-image-api":"setBrandImage","route-name":"brands",name:e.$t("prod.brand"),gate:"brand","validation-keys":["title","slug"],"file-keys":["id","status"],result:s(t),onResult:h},{form:D(({hasError:r})=>[a("div",N,[a("label",null,l(e.$t("index.title")),1),p(a("input",{type:"text",placeholder:e.$t("index.title"),name:"title","onUpdate:modelValue":o[0]||(o[0]=n=>s(t).title=n),ref:"title",onChange:o[1]||(o[1]=(...n)=>e.slugChange&&e.slugChange(...n)),class:m({invalid:!s(t).title&&r})},null,42,P),[[g,s(t).title]]),!s(t).title&&r?(d(),c("span",R,l(e.$t("category.req",{type:e.$t("index.title")})),1)):i("",!0)]),a("div",q,[a("label",null,l(e.$t("category.slug")),1),p(a("input",{type:"text",placeholder:e.$t("category.slug"),name:"slug","onUpdate:modelValue":o[2]||(o[2]=n=>s(t).slug=n),ref:"slug",class:m({invalid:!s(t).slug&&r})},null,10,I),[[g,s(t).slug]]),!s(t).slug&&r?(d(),c("span",L,l(e.$t("category.req",{type:e.$t("category.slug")})),1)):i("",!0)]),a("div",O,[a("div",T,[a("span",U,l(e.$t("category.featured")),1),y(u,{selectedKey:`${s(t).featured}`,options:s(v),onClicked:b},null,8,["selectedKey","options"])])]),a("div",z,[a("div",G,[a("span",M,l(e.$t("category.status")),1),y(u,{selectedKey:`${s(t).status}`,options:s(f),onClicked:$},null,8,["selectedKey","options"])])])]),_:1},8,["name","result"])):i("",!0)}}};export{se as default};
