import{l as k,i as o,j as x,a as p,c as i,o as a,f as b,d as c,w as m,b as n,F as f,h as g}from"./vue.esm-bundler-DZdE0M9V.js";const y={class:"fct-multiple-select-group"},C={class:"input-prepend"},w={class:"input-append"},j={__name:"Categories",props:{field:{type:Object},value:{type:Object},fieldKey:{type:String}},setup(l){k().ctx;const h=l,d=o("include"),v=o([]),V=o([]),_=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:_.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{j as default};
