import{S as e,i as t,s as a,v as l,w as n,g as i,k as s,l as o,o as r,x as d,y as c,q as u,I as b,a0 as f,aa as x,z as $,A as h,t as m,b as p,J as I,B as C,a5 as g,C as _,G as v,H as y,h as S,n as W,M as k,j as w,c as A,p as M,a as j,r as E,m as D,d as R,a1 as V}from"./index.6b674a45.js";import{C as q}from"./Close16.3e9706ae.js";function z(e){let t,a,C,g,_,v,y,S,W;const k=e[11].default,w=l(k,e,e[10],null);let A=[{role:a=e[5]?"combobox":e[2]},{"aria-expanded":e[5]},{"aria-owns":C=e[5]&&e[6]||void 0},{"aria-controls":g=e[5]&&e[6]||void 0},{"aria-disabled":e[1]},{"aria-label":_=e[5]?e[4]("close"):e[4]("open")},{tabindex:v=e[1]?"-1":e[3]},e[7]],M={};for(let e=0;e$[e])}=t,{id:f="ccs-"+Math.random().toString(36)}=t,{ref:x=null}=t;const $={[u.close]:"Close menu",[u.open]:"Open menu"},h=g("MultiSelect");let m,p;return e.$$set=e=>{a(21,t=n(n({},t),_(e))),a(7,i=C(t,l)),"disabled"in e&&a(1,r=e.disabled),"role"in e&&a(2,d=e.role),"tabindex"in e&&a(3,c=e.tabindex),"translateWithId"in e&&a(4,b=e.translateWithId),"id"in e&&a(9,f=e.id),"ref"in e&&a(0,x=e.ref),"$$scope"in e&&a(10,o=e.$$scope)},e.$$.update=()=>{1&e.$$.dirty&&h&&x&&h.declareRef({key:"field",ref:x}),a(5,m=t["aria-expanded"]),512&e.$$.dirty&&a(6,p="menu-"+f)},t=_(t),[x,r,d,c,b,m,p,i,u,f,o,s,function(t){v(e,t)},function(t){v(e,t)},function(t){v(e,t)},function(t){v(e,t)},function(t){v(e,t)},function(t){v(e,t)},function(e){y[e?"unshift":"push"](()=>{x=e,a(0,x)})}]}class G extends e{constructor(e){super(),t(this,e,B,z,a,{disabled:1,role:2,tabindex:3,translationIds:8,translateWithId:4,id:9,ref:0})}get translationIds(){return this.$$.ctx[8]}}function H(e){let t;return{c(){t=S(e[1])},l(a){t=W(a,e[1])},m(e,a){u(e,t,a)},p(e,a){2&a&&k(t,e[1])},d(e){e&&r(t)}}}function J(e){let t,a,l,$,C,g,_,v=e[1]&&H(e);l=new q({});let y=[{role:"button"},{"aria-label":"Clear Selection"},{tabindex:$=e[2]?"-1":"0"},{title:e[3]},e[5]],S={};for(let e=0;eu[e])}=t,{ref:c=null}=t;const u={[r.clearAll]:"Clear all selected items",[r.clearSelection]:"Clear selected item"},b=V(),f=g("MultiSelect");let x;return e.$$set=e=>{t=n(n({},t),_(e)),a(5,i=C(t,l)),"selectionCount"in e&&a(1,s=e.selectionCount),"disabled"in e&&a(2,o=e.disabled),"translateWithId"in e&&a(7,d=e.translateWithId),"ref"in e&&a(0,c=e.ref)},e.$$.update=()=>{1&e.$$.dirty&&f&&c&&f.declareRef({key:"selection",ref:c}),130&e.$$.dirty&&a(3,x=d(s?"clearAll":"clearSelection"))},[c,s,o,x,b,i,r,d,function(e){y[e?"unshift":"push"](()=>{c=e,a(0,c)})},e=>{o||b("clear",e)},e=>{o||"Enter"!==e.key||b("clear",e)}]}class O extends e{constructor(e){super(),t(this,e,L,J,a,{selectionCount:1,disabled:2,translationIds:6,translateWithId:7,ref:0})}get translationIds(){return this.$$.ctx[6]}}export{G as L,O as a};