import{L as S,u as g,c as x,b as d,e as r,w as a,h as f,f as l,t as p,g as c,am as C,B as F,j as b,F as v,k as V,C as B,q as m,n as h,ag as Q,i as D,E,D as L,m as j}from"./index-OSKNspXo.js";const I={style:{"text-overflow":"ellipsis",overflow:"hidden"}},M=["onClick"],U={__name:"chipStateComponent",props:{states:{type:Object},applyFilter:{type:Function}},setup(u){S();const{t:s}=g({useScope:"parent"}),i=u,w=x(()=>{let e=i.states.filter(o=>o.isSelect).map(o=>s(o.label)).join(",");return e||"riedl.output.state.all"});async function y(){await i.applyFilter()}async function _(){i.states.forEach(e=>e.isSelect=!1),await i.applyFilter()}async function k(e){e.isSelect=!e.isSelect,await i.applyFilter()}return(e,o)=>(r(),d(j,{color:"primary","text-color":"white",class:"cursor-pointer","icon-right":"arrow_drop_down",style:{"max-width":"30vw"}},{default:a(()=>[f("div",I,p(c(s)("riedl.output.state.filter"))+" : "+p(c(s)(w.value)),1),l(C,null,{default:a(()=>[l(F,{style:{"min-width":"200px","max-height":"400px","overflow-y":"auto"},separator:""},{default:a(()=>[(r(!0),b(v,null,V(u.states,t=>B((r(),d(m,{style:{padding:"0",width:"100%"},"active-class":"primary-selected",active:t.isSelect,key:t},{default:a(()=>[l(h,{avatar:""},{default:a(()=>[l(Q,{modelValue:t.isSelect,"onUpdate:modelValue":n=>t.isSelect=n,onClick:n=>y(t)},null,8,["modelValue","onUpdate:modelValue","onClick"])]),_:2},1024),l(h,null,{default:a(()=>[f("span",{class:"form-control-label cursor-pointer h-100 row items-center",onClick:D(n=>k(t),["stop"])},p(c(s)(t.label)),9,M)]),_:2},1024)]),_:2},1032,["active"])),[[E]])),128)),l(m,null,{default:a(()=>[l(L,{label:c(s)("riedl.output.filter.unselect.all"),click:()=>_()},null,8,["label","click"])]),_:1})]),_:1})]),_:1})]),_:1}))}};export{U as _};
//# sourceMappingURL=chipStateComponent-BAa4VTZY.js.map
