import{l as m,i as f,j as p,a as r,c as s,o as a,d as v,w as h,F as y,h as _,b}from"./vue.esm-bundler-DZdE0M9V.js";const g={class:"input-append"},x={__name:"Categories",props:{field:{type:Object},value:{type:Object},fieldKey:{type:String}},setup(e){const c=m().ctx,o=f([]),d=()=>{c.$get("products/fetch-term").then(l=>{o.value=l.taxonomies["product-categories"].terms}).catch(l=>{}).finally(()=>{})};return p(()=>{d()}),(l,n)=>{const i=r("el-option"),u=r("el-select");return a(),s("div",g,[v(u,{modelValue:e.value[e.fieldKey],"onUpdate:modelValue":n[0]||(n[0]=t=>e.value[e.fieldKey]=t),multiple:"",placeholder:e.field.placeholder,filterable:"",remote:"","reserve-keyword":!1},{default:h(()=>[(a(!0),s(y,null,_(o.value,t=>(a(),b(i,{key:t.term_id,label:t.name,value:t.term_id},null,8,["label","value"]))),128))]),_:1},8,["modelValue","placeholder"])])}}};export{x as default};
