import{d as v,r as i,c as y,w,o as t,e as a,f as l,l as b,aA as D,K as d,F as k,s as I,x as M,t as u,y as S,z as W,_ as C}from"./index-Bu3rAGYU.js";const g=e=>(S("data-v-13ca28ab"),e=e(),W(),e),x={class:"WdsDropdownMenu"},B={key:0,class:"WdsDropdownMenu__search-wrapper"},q={class:"WdsDropdownMenu__search"},F=g(()=>l("i",{class:"material-symbols-outlined"},"search",-1)),L=["onClick"],V={key:0,class:"material-symbols-outlined"},z={class:"WdsDropdownMenu__item__label"},A={key:1,class:"material-symbols-outlined"},N=v({__name:"WdsDropdownMenu",props:{options:{type:Array,default:()=>[]},hideIcons:{type:Boolean,required:!1},enableSearch:{type:Boolean,required:!1},selected:{type:String,required:!1,default:void 0}},emits:{select:e=>typeof e=="string",search:e=>typeof e=="string"},setup(e,{emit:p}){const r=e,_=p,h=i(),o=i("");function m(n){return r.hideIcons?"":n.icon??"help_center"}const f=y(()=>{if(!r.enableSearch)return r.options;const n=o.value.toLowerCase();return r.options.filter(c=>c.label.toLowerCase().includes(n))});return w(o,()=>_("search",o.value)),(n,c)=>(t(),a("div",x,[e.enableSearch?(t(),a("div",B,[l("div",q,[F,b(l("input",{ref_key:"searchInput",ref:h,"onUpdate:modelValue":c[0]||(c[0]=s=>o.value=s),class:"WdsDropdownMenu__search__input",type:"text",placeholder:"Search",autocomplete:"off"},null,512),[[D,o.value]])])])):d("",!0),(t(!0),a(k,null,I(f.value,s=>(t(),a("button",{key:s.value,class:M(["WdsDropdownMenu__item",{"WdsDropdownMenu__item--selected":s.value===e.selected}]),onClick:T=>n.$emit("select",s.value)},[e.hideIcons?d("",!0):(t(),a("i",V,u(m(s)),1)),l("div",z,u(s.label),1),s.value===e.selected?(t(),a("i",A," check ")):d("",!0)],10,L))),128))]))}}),E=C(N,[["__scopeId","data-v-13ca28ab"]]);export{E as default};
