import{_ as h}from"./BOhf1Bbf.js";import{j as f,d as g,w as y,m as a,o as r,b as l,G as d,c as i,e as $,t as s,D as w,I as m,F as V,g as k,E as A}from"./Bgmy51Qv.js";import"./CNIrc0EA.js";import"./DZl4_Bww.js";import"./AmaTRG5a.js";import"./BHvLfWtM.js";import"./DuSynPle.js";import"./B2895E6R.js";import"./D_7E8SMU.js";import"./7pZkuj9N.js";const B={class:"input-wrapper"},C=["placeholder"],D={key:0,class:"error"},N={class:"info-msg mb-20 mb-sm-15"},P={class:"input-wrapper mb-5"},U={class:"attribute-value-wrapper mlr--7-5"},x=["onUpdate:modelValue"],T={__name:"[id]",setup(F){const t=f({id:"",title:"",values:[]}),c=e=>{t.value=e},_=()=>{t.value.values.push({title:""})};return(e,o)=>{const b=h;return r(),g(b,{ref:"dataPage","set-api":"setAttribute","get-api":"getAttribute","empty-store-variable":"allAttributes","route-name":"attributes",name:e.$t("fSale.attr"),"validation-keys":["title"],result:a(t),gate:"attribute",onResult:c},{form:y(({hasError:n})=>[l("div",B,[l("label",null,s(e.$t("index.title")),1),d(l("input",{type:"text",placeholder:e.$t("index.title"),name:"title","onUpdate:modelValue":o[0]||(o[0]=u=>a(t).title=u),class:w({invalid:!a(t).title&&n})},null,10,C),[[m,a(t).title]]),!a(t).title&&n?(r(),i("span",D,s(e.$t("category.req",{type:e.$t("index.title")})),1)):$("",!0)]),l("p",N,s(e.$t("brand.delAttr")),1),l("div",P,[l("label",null,s(e.$t("brand.aVal")),1),l("div",U,[(r(!0),i(V,null,k(a(t).values,(u,p)=>d((r(),i("input",{type:"text",placeholder:"Name","onUpdate:modelValue":v=>a(t).values[p].title=v,class:"mlr-7-5"},null,8,x)),[[m,a(t).values[p].title]])),256)),l("button",{class:"lite-btn mlr-7-5",onClick:A(_,["prevent"])},s(e.$t("brand.addAttr")),1)])])]),_:1},8,["name","result"])}}};export{T as default};
