import{_ as r,o as s,c as l,a as i,r as d,b as u,w as f,h as v,f as g,T as y,n as C,t as w}from"./index.js";import{R as E}from"./RangeSlider.js";function j(e){return e.map(([n,o,a])=>({nickname:n,playerId:o,volume:a})).sort((n,o)=>n.playerId===-1?-1:o.playerId===-1?1:n.nickname.toLowerCase()<o.nickname.toLowerCase()?-1:n.nickname.toLowerCase()>o.nickname.toLowerCase()?1:0)}const b={},S={xmlns:"http://www.w3.org/2000/svg",width:"18",height:"15",viewBox:"0 0 18 15",fill:"none"},R=i("path",{d:"M1 8.42857L5.57143 13L17 1",stroke:"white","stroke-width":"2"},null,-1),L=[R];function N(e,t){return s(),l("svg",S,L)}const $=r(b,[["render",N]]);function B(e,t,n,o,a,c){const _=d("Check");return s(),l("div",{class:C(["checkbox",{checkbox_checked:n.checked}]),onClick:t[0]||(t[0]=h=>c.playClickSound(()=>e.$emit("change")))},[u(y,{name:"fade"},{default:f(()=>[n.checked?(s(),v(_,{key:0})):g("",!0)]),_:1})],2)}const T={props:{checked:{type:Boolean,default:!1},clickSound:{type:String,default:""}},components:{Check:$},methods:{playClickSound(e){this.clickSound.length&&window.playSound(this.clickSound),e()}}},V=r(T,[["render",B],["__scopeId","data-v-01777581"]]),M={},I={width:"6",height:"8",viewBox:"0 0 6 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"},A=i("path",{d:"M5 8L5 4.76837e-07M1 8L1 1.27146e-07",stroke:"#010106","stroke-width":"2"},null,-1),G=[A];function D(e,t){return s(),l("svg",I,G)}const O=r(M,[["render",D]]),m={S:0,M:1},p={DEFAULT:0,GREEN:1},z={class:"checkbox-range__body"},U={class:"checkbox-range__value"};function H(e,t,n,o,a,c){const _=d("Checkbox"),h=d("Handle"),x=d("RangeSlider");return s(),l("div",{class:C(["checkbox-range",c.classes])},[n.useCheckbox?(s(),v(_,{key:0,checked:a.value,onChange:t[0]||(t[0]=k=>e.$emit("change",n.data.value>0?0:100))},null,8,["checked"])):g("",!0),i("div",z,[i("div",U,w(a.value)+"%",1),u(x,{value:n.data.value,min:n.data.min,max:n.data.max,isRoundValue:!0,trackBorderRadius:"0.09vh",lineBg:"transparent",onClick:t[1]||(t[1]=k=>c.playClickSound()),onEndMove:t[2]||(t[2]=k=>a.sendEvent=!0),onValueChanged:c.onRange},{default:f(()=>[u(h,{class:"knob__handle"})]),_:1},8,["value","min","max","onValueChanged"])])],2)}const P={props:{data:{type:Object},sizeType:{type:Number,default:m.M},colorType:{type:Number,default:p.DEFAULT},clickSound:{type:String,default:""},checkboxClickSound:{type:String,default:""},useCheckbox:{type:Boolean,default:!0}},components:{Handle:O,Checkbox:V,RangeSlider:E},data(){return{value:0,sendEvent:!1}},computed:{classes(){return{"checkbox-range_zero":this.value===0,"checkbox-range_green":this.colorType===p.GREEN,"checkbox-range_size-s":this.sizeType===m.S}}},methods:{onRange(e){this.value=e,this.sendEvent&&(this.$emit("change",e),this.sendEvent=!1)},playClickSound(e){this.clickSound.length&&window.playSound(this.clickSound),e()}},watch:{"data.value":{handler(e){this.value=e},immediate:!0}}},Z=r(P,[["render",H],["__scopeId","data-v-91dfb92f"]]);export{V as C,Z as R,p as a,m as b,j as p};
