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