import{_ as S}from"./BCard.vue_vue_type_script_setup_true_lang-BAaV9t2h-BRkPXOoi.js";import{_ as g}from"./useFormSelect-DvaFh_iu-BGTVaqMd.js";import{_ as C}from"./BFormValidFeedback.vue_vue_type_script_setup_true_lang-D5WYd1j7-BqGw1a2-.js";import{_ as w}from"./BFormInput.vue_vue_type_script_setup_true_lang-B9E5yJEs-DBdCBfsp.js";import{_ as U}from"./BFormSelect.vue_vue_type_script_setup_true_lang-CkLgnxVA-_BER9NPg.js";import{_ as x}from"./BCol.vue_vue_type_script_setup_true_lang-D0xTJQ30-C8E8teuV.js";import{_ as $}from"./BRow.vue_vue_type_script_setup_true_lang-BDkBauhk-2kwIwZ0y.js";import{_ as B}from"./BFormCheckboxGroup.vue_vue_type_script_setup_true_lang-CZ2qJTp0-lrA37oyN.js";import N from"./AuthoritySelector-BRuotTVh.js";import{_ as O,c as n,o,w as a,g as q,b as l,h as T,a as j,t as s,d as p,e as c,F as f,r as b}from"./index-D02r7Zsc.js";import"./dom-DVb-f0ZG-Crdf0-mU.js";import"./useColorVariantClasses-ZDE19TZw-Cvu7SygP.js";import"./useDefaults-DESCdb0p-CFLjYrdG.js";import"./BImg.vue_vue_type_script_setup_true_lang-BJeFN9OT-6jJZkpT2.js";import"./useRadiusElementClasses-DtKYQuWz-DKKObN9q.js";import"./object-0ALvRU0O-3BORTTD-.js";import"./index-C0p9vHHI-DoOEDIMw.js";import"./useStateClass-BGbSLWFN-BcKQ8Z3i.js";import"./useId-t29UARy6-BH5d2231.js";import"./getClasses-CsgNQabU-zDOdZIGY.js";import"./useAlignment-Cw-9AVid-Db1FQC5G.js";import"./ConditionalWrapper.vue_vue_type_script_lang-IX_NpHH--DrWkD0m2.js";const A={name:"criteria",components:{AuthoritySelector:N},props:{criteria:{type:Object,required:!0},criteriaInputs:{type:Object,required:!0}},data:function(){return{criteriaStatus:!1}},watch:{criteriaStatus:function(i){i||this.$emit("close",this.criteria.id)}},mounted:function(){this.criteria.fieldvar={id_thesaurus:["1"]},this.criteria.operator_between_multiple_authorities=["or"]}};function F(i,r,e,L,z,D){const y=B,u=x,I=$,m=g,_=U,V=w,v=q("authority-selector"),k=C,h=S;return o(),n(h,{class:"m-3 h5","bg-variant":"light","text-variant":"primary"},{default:a(()=>[l(I,{"align-v":"center",class:"my-4"},{default:a(()=>[l(u,{cols:"3"},{default:a(()=>[l(y,{role:"checkbox","aria-labelledby":e.criteria.label,size:"lg",switch:"",modelValue:i.criteriaStatus,"onUpdate:modelValue":r[0]||(r[0]=t=>i.criteriaStatus=t),value:!0,"unchecked-value":!1},null,8,["aria-labelledby","modelValue"])]),_:1}),l(u,{cols:"9"},{default:a(()=>[j("span",{class:"title h4",onClick:r[1]||(r[1]=t=>i.criteriaStatus=!i.criteriaStatus)},s(e.criteria.label),1)]),_:1})]),_:1}),i.criteriaStatus?(o(),n(k,{key:0},{default:a(()=>[l(u,{cols:"12",class:"py-2"},{default:a(()=>[l(_,{required:"",modelValue:e.criteriaInputs.operators,"onUpdate:modelValue":r[2]||(r[2]=t=>e.criteriaInputs.operators=t)},{default:a(()=>[l(m,{value:null,disabled:""},{default:a(()=>[c(s(i.$t("criteria.operatorSelectorCaption")),1)]),_:1}),(o(!0),p(f,null,b(e.criteria.operators,(t,d)=>(o(),n(m,{key:d,value:t.id},{default:a(()=>[c(s(i.$t(`advancedSearchOperatorsLabels.${t.id}`)),1)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue"])]),_:1}),e.criteria.values.length>0?(o(),n(u,{key:0},{default:a(()=>[l(_,{modelValue:e.criteriaInputs.textInput,"onUpdate:modelValue":r[3]||(r[3]=t=>e.criteriaInputs.textInput=t)},{default:a(()=>[l(m,{value:null,disabled:""},{default:a(()=>[c(s(i.$t("criteria.operatorCriteriaCaption")),1)]),_:1}),(o(!0),p(f,null,b(e.criteria.values,(t,d)=>(o(),n(m,{key:d,value:t.value_id},{default:a(()=>[c(s(t.value_caption),1)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue"])]),_:1})):(o(),n(u,{key:1},{default:a(()=>[e.criteriaInputs.operators!="AUTHORITY"?(o(),n(V,{key:0,type:"search",placeholder:i.$t("criteria.criteriaPlaceholder"),modelValue:e.criteriaInputs.textInput,"onUpdate:modelValue":r[4]||(r[4]=t=>e.criteriaInputs.textInput=t)},null,8,["placeholder","modelValue"])):(o(),n(v,{key:1,criteria:e.criteria,modelValue:e.criteriaInputs.textInput,"onUpdate:modelValue":r[5]||(r[5]=t=>e.criteriaInputs.textInput=t),onUpdate:r[6]||(r[6]=t=>e.criteriaInputs.textInput=t)},null,8,["criteria","modelValue"]))]),_:1}))]),_:1})):T("",!0)]),_:1})}const st=O(A,[["render",F]]);export{st as default};
