import{_ as C}from"./D_7E8SMU.js";import{_ as $}from"./BOhf1Bbf.js";import{j as h,d as k,w,m as s,o as r,b as o,G as p,c as u,e as d,t as n,D as c,I as m,f as b}from"./Bgmy51Qv.js";import{u as P}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 V={class:"input-wrapper"},B=["placeholder"],D={key:0,class:"error"},j={class:"input-wrapper"},N=["placeholder"],q={key:0,class:"error"},K={class:"input-wrapper"},R={class:"dply-felx j-left mb-20 mb-sm-15"},S={class:"mr-15"},L={__name:"[id]",setup(U){const e=h({id:"",title:"",slug:"",status:2}),{statusObj:g}=P(),_=t=>{e.value.status=t.key},y=t=>{e.value=t};return(t,l)=>{const f=C,v=$;return r(),k(v,{ref:"dataPage","set-api":"setProductCollection","get-api":"getProductCollection","route-name":"product-collections","empty-store-variable":"allProductCollections",name:t.$t("dataPage.prodCol"),"validation-keys":["title","slug"],result:s(e),gate:"product_collection",onResult:y},{form:w(({hasError:i})=>[o("div",V,[o("label",null,n(t.$t("index.title")),1),p(o("input",{type:"text",placeholder:t.$t("index.title"),name:"title","onUpdate:modelValue":l[0]||(l[0]=a=>s(e).title=a),ref:"title",onChange:l[1]||(l[1]=(...a)=>t.slugChange&&t.slugChange(...a)),class:c({invalid:!s(e).title&&i})},null,42,B),[[m,s(e).title]]),!s(e).title&&i?(r(),u("span",D,n(t.$t("category.req",{type:t.$t("index.title")})),1)):d("",!0)]),o("div",j,[o("label",null,n(t.$t("category.slug")),1),p(o("input",{type:"text",placeholder:t.$t("category.slug"),name:"slug","onUpdate:modelValue":l[2]||(l[2]=a=>s(e).slug=a),ref:"slug",class:c({invalid:!s(e).slug&&i})},null,10,N),[[m,s(e).slug]]),!s(e).slug&&i?(r(),u("span",q,n(t.$t("category.req",{type:t.$t("category.slug")})),1)):d("",!0)]),o("div",K,[o("div",R,[o("span",S,n(t.$t("category.status")),1),b(f,{selectedKey:`${s(e).status}`,options:s(g),onClicked:_},null,8,["selectedKey","options"])])])]),_:1},8,["name","result"])}}};export{L as default};
