import{C as f}from"./Button.js";import{B as b}from"./ButtonContainer.js";import{_ as v}from"./arrow3.js";import{r as _,o as s,c as i,a as o,d,f as l,F as y,i as E,b as u,w as B,t as I,n as k,p as g,g as M,_ as S}from"./index.js";import"./telegram-authenticator.js";import"./close2.js";import"./donate.js";import"./money.js";/* empty css                                                               */const p=t=>(g("data-v-c25d579d"),t=t(),M(),t),T={class:"interactions__wrapper"},w={class:"interactions__container"},x=["onClick"],A=p(()=>o("div",{class:"interactions-list__before"},null,-1)),L={key:0,src:v},O=["innerHTML"],N=p(()=>o("div",{class:"interactions-line"},null,-1)),P={key:1,class:"interactions-hint"},V={class:"interactions-hint-text"};function q(t,n,r,R,a,e){const h=_("ControlsButton"),m=_("ControlsButtonContainer");return s(),i("div",{class:k(["interactions",{interactions_mobile:e.isMobile,"interactions_mobile-square":e.isSquareMobile}]),style:d(`transform: scale(${e.isMobile?1:a.scale})`)},[o("div",T,[o("div",w,[e.isMobile?l("",!0):(s(),i("div",{key:0,class:"interactions-background",style:d(`height: ${8.5*this.list.length}vh`)},null,4)),(s(!0),i(y,null,E(a.list,(C,c)=>(s(),i("div",{class:"interactions-list",key:c,onClick:Y=>e.onClick(c)},[A,e.isMobile?(s(),i("img",L)):l("",!0),o("div",{class:"interactions-title",innerHTML:C.title},null,8,O),N],8,x))),128)),e.isMobile?l("",!0):(s(),i("div",P,[u(m,{class:"interactions-hint-button"},{default:B(()=>[u(h,{text:"ALT",keyCode:a.KEY_CODE_ALT},null,8,["keyCode"])]),_:1}),o("div",V,I(e.getActionText()),1)]))])])],6)}const D=309,K={props:["openParams"],components:{ControlsButton:f,ControlsButtonContainer:b},data(){return{scale:1.1,KEY_CODE_ALT:window.KEY_CODE_ALT,list:[{title:"132",type:309}]}},computed:{isMobile(){return this.$root.isMobile},isSquareMobile(){return this.$root.isSquareMobile},isInteractionsVisible(){return this.$root.isInteractionsVisible}},created(){this.$data.noAdaptation=!0,this.isMobile||(this.scale=.8),this.openParams&&this.setInfo(this.openParams)},methods:{setInfo(t){let n=[];t=typeof t=="object"?t:JSON.parse(t);for(let r in t)n.push({type:t[r][0],title:t[r][1]});this.list=n},onClick(t){this.sound(t),sendClientEvent(gm.EVENT_EXECUTE_PUBLIC,"OnInteractionsClick",this.list[t].type)},sound(t){this.list[t].type==D&&window.playSound("general/sfx_bat_hit.mp3")},getActionText(){return this.list.length>1?"Показать курсор":"Выполнить действие"},close(){window.closeInterface("Interactions")}}},Z=S(K,[["render",q],["__scopeId","data-v-c25d579d"]]);export{Z as default};
