1import{_ as w,K as g}from"./DJVC5h9u.js";import{r as v,L as y,M as b,c as o,o as l,a as s,g as k,d as u,b as c,n as p,y as a,t as n,x as m,F as h,E as C,e as _,ac as $}from"./CxxoAl0t.js";const S=g({setup(){return{id:$().replaceAll("_","-")}},props:{value:{type:Object,default:null},placeholder:{type:[String,Number],default:null},options:{type:Array,default:()=>[]},icon:{type:String,default:null},dropdownMaxHeight:{type:String,default:"300px"}},emits:["onSelect"],data(){return{show:!1}},methods:{select(e){this.show=!1,this.$emit("onSelect",e)},clear(){this.show=!1,this.$emit("onSelect",null)},toggle(){this.show=!this.show},hide(){this.show=!1},getCompareValue(e){return e?.id??e?.text??e?.value}}},"$W6HQU3_Er7"),x={class:"flex bg-dirty-blue items-center rounded-lg"},V=["id"],z={class:"icon-dropdown-icon h-[60px] text-medium-blue p-3 flex justify-center items-center -m-1"},N={class:"grow flex max-w-full items-center"},B={class:"top-0 left-0 w-full text-left -mt-1 pl-0 md:pl-2"},D={key:1},H={class:"text-white bg-medium-blue rounded-full h-8 w-8 min-w-8 flex items-center justify-center mr-2 ml-auto mb-auto"},E=["aria-labelledby"],I={class:"size-full p-2"},M=["onClick"],A={class:"ml-auto"};function F(e,i,L,T,j,K){const r=v("fa"),f=y("click-outside");return b((l(),o("div",{class:a(["icon-dropdown dropdown",{show:e.show}])},[s("div",x,[s("button",{id:e.id,class:"py-2 px-2 inline-flex grow items-center bg-transparent flex-wrap","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false",onClick:i[0]||(i[0]=(...t)=>e.toggle&&e.toggle(...t))},[s("div",z,[c(r,{class:"w-auto",icon:e.icon},null,8,["icon"]),p(e.$slots,"icon",{},void 0,!0)]),s("div",N,[s("div",{class:a(["px-2 text-left",{"font-bold":e.value===null}])},[s("span",B,[!e.value&&e.$slots.placeholder?p(e.$slots,"placeholder",{key:0},void 0,!0):(l(),o("span",D,n(e.value?.text??e.value?.value??e.placeholder),1))])],2),s("div",H,[c(r,{class:"transition-transform",icon:"chevron-down",size:"lg",style:m({transform:`rotateX(${e.show?"180deg":"0"})`})},null,8,["style"])])])],8,V),e.value!==null?(l(),k(r,{key:0,class:"mb-0 ml-auto mr-4 transition-transform z-[5] cursor-pointer",icon:"circle-xmark",size:"2xl",onClick:e.clear},null,8,["onClick"])):u("",!0)]),s("div",{class:a(["dropdown-menu w-full overflow-auto shadow-below-light rounded-top-0 m-0 p-0 border-0",{show:e.show}]),"aria-labelledby":e.id,style:m({maxHeight:e.dropdownMaxHeight})},[s("div",I,[(l(!0),o(h,null,C(e.options,(t,d)=>(l(),o("div",{key:t.id??t.text??d,class:a(["dropdown-item py-0 px-4",{active:e.getCompareValue(t)===e.getCompareValue(e.value)}])},[s("div",{class:a(["cursor-pointer py-2 border-light-gray flex",{"border-b":d!==e.options.length-1}]),onClick:O=>e.select(t)},[t?.text??t?.value?(l(),o(h,{key:0},[_(n(t?.text??t?.value),1)],64)):u("",!0),s("div",A,n(t.endText),1)],10,M)],2))),128))])],14,E)],2)),[[f,e.hide]])}const W=w(S,[["render",F],["__scopeId","data-v-0805309d"]]);export{W as default}; 2//# sourceMappingURL=CpB7FuGq.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.