import{k as _,h as o,i as x,r as p,e as i,o as a,d as b,a as c,w as m,c as n,F as f,g}from"./vue.esm-bundler.js?ver=1.5.4";const y={class:"fct-multiple-select-group"},C={class:"input-prepend"},w={class:"input-append"},E={__name:"Categories",props:{field:{type:Object},value:{type:Object},fieldKey:{type:String}},setup(l){_().ctx;const h=l,d=o("include"),v=o([]),V=o([]),k=o([]);return x(()=>{d.value=h.field.value.length>0?"include":"exclude"}),(s,t)=>{const u=p("el-option"),r=p("el-select");return a(),i("div",y,[b("div",C,[c(r,{modelValue:d.value,"onUpdate:modelValue":t[0]||(t[0]=e=>d.value=e),placeholder:s.$t("Select"),filterable:"",clearable:""},{default:m(()=>[c(u,{disabled:V.value.length>0,label:s.$t("Include"),value:"include"},null,8,["disabled","label"]),c(u,{disabled:k.value.length>0,label:s.$t("Exclude"),value:"exclude"},null,8,["disabled","label"])]),_:1},8,["modelValue","placeholder"])]),b("div",w,[d.value==="exclude"?(a(),n(r,{key:0,modelValue:l.value.excluded_categories,"onUpdate:modelValue":t[1]||(t[1]=e=>l.value.excluded_categories=e),multiple:"",placeholder:l.field.placeholder,filterable:"",remote:"","reserve-keyword":!1},{default:m(()=>[(a(!0),i(f,null,g(v.value,e=>(a(),n(u,{key:e.term_id,label:e.name,value:e.term_id},null,8,["label","value"]))),128))]),_:1},8,["modelValue","placeholder"])):(a(),n(r,{key:1,modelValue:l.value.included_categories,"onUpdate:modelValue":t[2]||(t[2]=e=>l.value.included_categories=e),multiple:"",placeholder:l.field.placeholder,filterable:"",remote:"","reserve-keyword":!1},{default:m(()=>[(a(!0),i(f,null,g(v.value,e=>(a(),n(u,{key:e.term_id,label:e.name,value:e.term_id},null,8,["label","value"]))),128))]),_:1},8,["modelValue","placeholder"]))])])}}};export{E as default};
