import{_ as $}from"./D_7E8SMU.js";import{_ as b}from"./BOhf1Bbf.js";import{j as g,d as k,e as r,w,m as o,o as p,b as s,G as d,c,t as a,D as m,I as u,f as x}from"./Bgmy51Qv.js";import{u as R}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 T={class:"input-wrapper"},C=["placeholder"],V={key:0,class:"error"},B={class:"dply-felx align-start j-left mlr--7-5 inputs d-block-sm"},D={class:"input-wrapper mlr-7-5"},j={class:"flex-v-centered"},N={class:"mr-15"},P=["placeholder"],q={key:0,class:"error"},K={class:"input-wrapper mlr-7-5"},S={class:"sided f-none-sm f-right"},U={class:"mr-15 text-nowrap"},X={__name:"[id]",setup(z){const t=g({id:"",title:"",price:"",type:1}),_=e=>{t.value.type=e.key},y=e=>{t.value=e},{priceTypeObj:f}=R();return(e,l)=>{const v=$,h=b;return e.$can("tax_rule","view")?(p(),k(h,{key:0,ref:"dataPage","set-api":"setTaxRule","get-api":"getTaxRule","route-name":"tax-rules","empty-store-variable":"allTaxRules",name:e.$t("prod.tRule"),gate:"tax_rule","validation-keys":["title","price","type"],result:o(t),onResult:y},{form:w(({hasError:i})=>[s("div",T,[s("label",null,a(e.$t("index.title")),1),d(s("input",{type:"text",placeholder:e.$t("index.title"),name:"title","onUpdate:modelValue":l[0]||(l[0]=n=>o(t).title=n),ref:"title",class:m({invalid:!o(t).title&&i})},null,10,C),[[u,o(t).title]]),!o(t).title&&i?(p(),c("span",V,a(e.$t("category.req",{type:e.$t("index.title")})),1)):r("",!0)]),s("div",B,[s("div",D,[s("div",j,[s("span",N,a(e.$t("brand.price")),1),s("div",null,[d(s("input",{type:"number",step:"any",placeholder:e.$t("brand.price"),"onUpdate:modelValue":l[1]||(l[1]=n=>o(t).price=n),class:m({invalid:!o(t).price&&i})},null,10,P),[[u,o(t).price]]),!o(t).price&&i?(p(),c("span",q,a(e.$t("category.req",{type:e.$t("brand.price")})),1)):r("",!0)])])]),s("div",K,[s("div",S,[s("span",U,a(e.$t("brand.pType")),1),x(v,{selectedKey:`${o(t).type}`,options:o(f),onClicked:_},null,8,["selectedKey","options"])])])])]),_:1},8,["name","result"])):r("",!0)}}};export{X as default};
