import{_ as h,a as u,b as p,c as g,d as f,e as b,f as y,g as S,h as M}from"./search2.js";import{o as d,c as i,a as s,t as o,F as l,i as n,d as k,n as r,f as v,q as m,p as x,g as E,_ as I}from"./index.js";const w=t=>(x("data-v-918ed2fd"),t=t(),E(),t),C={class:"ms__container"},N={class:"ms__main"},P=m('<div class="ms__controls" data-v-918ed2fd><div class="ms__controls-button" data-v-918ed2fd><img src="'+g+'" data-v-918ed2fd></div><div class="ms__controls-button" data-v-918ed2fd><img src="'+f+'" data-v-918ed2fd></div><div class="ms__controls-button" data-v-918ed2fd><img src="'+b+'" data-v-918ed2fd></div></div>',1),B={class:"ms__display"},V={class:"ms__display-charging"},O={class:"value"},z={class:"ms__display-charging--energy"},F={class:"ms__display-charging__bars"},L={class:"ms__display-charging__box"},T=w(()=>s("img",{src:y},null,-1)),U={class:"ms__display-value"},q={class:"ms__display-value__bars"},A={class:"value"},D={class:"ms__display-status"},G={key:0,src:u},J={key:1,src:p},X={class:"text"},H=m('<div class="ms__controls" data-v-918ed2fd><div class="ms__controls-button" data-v-918ed2fd><img src="'+g+'" data-v-918ed2fd></div><div class="ms__controls-button" data-v-918ed2fd><img src="'+S+'" data-v-918ed2fd></div><div class="ms__controls-button" data-v-918ed2fd><img src="'+M+'" data-v-918ed2fd></div></div>',1),K={class:"ms__button"};function Q(t,a,W,Y,_,c){return d(),i("div",{class:r(["ms",{ms_mobile:c.isMobile}])},[s("div",C,[s("div",N,[P,s("div",B,[s("div",V,[s("div",O,o(_.charging)+"%",1),s("div",z,[s("div",F,[s("div",L,[(d(),i(l,null,n(3,e=>s("div",{class:"ms__display-charging__box-scale",key:e},[s("div",{class:"ms__display-charging__box-scale-line",style:k({width:`${Math.max((_.charging-100/3*(3-e))/(100/3)*100,0)}%`})},null,4)])),64))])]),T])]),s("div",U,[s("div",q,[(d(),i(l,null,n(3,e=>s("div",{class:"ms__display-value__bar",key:e},[s("img",{src:h,class:r({selected:_.signal>100/3*--e})},null,2)])),64))]),s("div",A,o(_.signal),1)]),s("div",D,[_.status==0?(d(),i("img",G)):v("",!0),_.status==1?(d(),i("img",J)):v("",!0),s("div",X,o(_.status==0?"Ожидание":"Поиск"),1)])]),H]),s("div",K,[s("div",{class:"button",onClick:a[0]||(a[0]=e=>c.shutdown())},"Выключение")])])],2)}const R={name:"GarbageMetalSearch",props:["openParams"],data(){return{charging:58,signal:10,status:1}},computed:{isMobile(){return this.$root.isMobile}},created(){this.$data.noAdaptation=!0,this.openParams&&this.getSearchInfo(this.openParams)},methods:{shutdown(){sendClientEvent(gm.EVENT_EXECUTE_PUBLIC,"OnPlayerOffMetalSearch")},playSignal(t,a){window.playSound("metal_search/"+t+".ogg",a)},getSearchInfo(t){let a=typeof t=="object"?t:JSON.parse(t);this.status=a[0],this.signal=a[1],this.charging=a[2]}}},$=I(R,[["render",Q],["__scopeId","data-v-918ed2fd"]]);export{$ as default};
