1import g from"./CcggGS2i.js";import u from"./DoP2-cPk.js";import m from"./2Kz32Cv7.js";import f from"./B0wsIG8O.js";import{_ as k,c as l,j as r,w as a,n as v,F as w,x as y,e as b,o as i,b as c}from"./C_dDoqqV.js";import"./B3UUmxRX.js";import"./cg-AAXxy.js";const O={name:"DropdownRadioButton",components:{RadioButton:f,Button:u,Tooltip:m},props:{options:{type:Array,required:!0,default:()=>[]},position:{type:String,default:"left",validator:e=>["left","right"].includes(e)},withTooltip:{type:Boolean,default:!0}},data(){return{isOpen:!1,selectedOptions:[],sortBy:this.$t("advancedToplist.sortBy")}},mounted(){this.selectedOptions=this.options.filter(e=>e?.selected)||[],document.addEventListener("click",this.handleClickOutside)},beforeUnmount(){document.removeEventListener("click",this.handleClickOutside)},methods:{selectOption(e){this.$emit("update:modelValue",e)},handleClickOutside(e){const t=this.$refs.dropdown;t&&!t.contains(e.target)&&(this.isOpen=!1)}}},B={ref:"dropdown",class:"relative inline-block text-left"};function C(e,t,s,z,o,h){const d=g,p=u,_=m,x=f;return i(),l("div",B,[s.withTooltip?(i(),r(_,{key:0,content:o.sortBy},{default:a(()=>[c(p,{variant:"ghost",size:"MD",icon:"","icon-only":!0,class:"w-[30px] h-[30px] lg:w-[41px] lg:h-[41px] leading-none mb-3xs",full:"",fullHeight:"",iconPosition:"left",onClick:t[0]||(t[0]=n=>o.isOpen=!o.isOpen)},{"icon-only":a(()=>[c(d,{name:"data-transfer-vertical","aria-hidden":"true",role:"img",class:"text-ghost-foreground hover:text-ghost-foreground w-[16px] h-[16px]"})]),_:1})]),_:1},8,["content"])):(i(),r(p,{key:1,variant:"ghost",size:"MD",icon:"","icon-only":!0,class:"w-[30px] h-[30px] lg:w-[41px] lg:h-[41px] leading-none mb-3xs",full:"",fullHeight:"",iconPosition:"left",onClick:t[1]||(t[1]=n=>o.isOpen=!o.isOpen)},{"icon-only":a(()=>[c(d,{name:"data-transfer-vertical","aria-hidden":"true",role:"img",class:"text-ghost-foreground hover:text-ghost-foreground w-[16px] h-[16px]"})]),_:1})),o.isOpen?(i(),l("div",{key:2,class:v(["flex mt-2xs flex-col gap-md absolute z-40 p-sm max-h-[286px] w-max overflow-y-auto rounded-md background-flyout border-sm color-stroke-elevation min-w-[275px] backdrop-blur-md shadow-bottom-large",{"left-0":s.position==="left","right-0":s.position==="right"}])},[(i(!0),l(w,null,y(s.options,n=>(i(),r(x,{key:n.value,label:n.label,checked:n.selected||!1,size:"SM",onClick:T=>h.selectOption(n)},null,8,["label","checked","onClick"]))),128))],2)):b("",!0)],512)}const j=Object.assign(k(O,[["render",C]]),{__name:"DropdownRadioButton"});export{j as default};
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.