import{c as u,P as l,b as d}from"./MainMap.js";import{_}from"./Map.vue_vue_type_style_index_0_scoped_a1185353_lang.js";import"./DefaultMapMarkerOverwrite.js";/* empty css                                                      */import{r,o as C,c as f,b as n,a as s,e as h,t as P,d as M,p as S,g as w,_ as b}from"./index.js";import"./ScrollableContainer.js";/* empty css                                          *//* empty css                                                           *//* empty css                                                      */import"./Button.js";/* empty css                                                               */import{C as y}from"./ContaineredButton.js";import{C as g}from"./Close.js";import{_ as v}from"./icon-zoom.js";import"./dom.js";import"./phoneSharingCar.js";import"./92.js";import"./array.js";import"./telegram-authenticator.js";import"./close2.js";import"./donate.js";import"./money.js";import"./ButtonContainer.js";const E=t=>(S("data-v-286d265f"),t=t(),w(),t),k={class:"fast-map"},x={class:"fast-map__map"},D={class:"fast-map__map-hints-bar"},T={class:"fast-map__map-buttons"},B={class:"fast-map__map-zoom"},I=E(()=>s("img",{class:"fast-map__map-zoom-icon",src:v},null,-1));function Z(t,e,N,O,i,o){const p=r("ControlsClose"),a=r("ControlsContaineredButton"),c=r("MainMap");return C(),f("div",k,[n(p,{class:"fast-map__close",onClose:o.close},null,8,["onClose"]),s("div",x,[s("div",D,[s("div",T,[n(a,{containerText:"Приблизить/Отдалить",middleMouse:!0,clickable:!1}),n(a,{containerText:"Двигать Карту",leftMouse:!0,clickable:!1}),n(a,{containerText:i.cursorStatus?"Поставить метку":"Включить курсор",rightMouse:!0,clickable:!1},null,8,["containerText"])]),s("div",B,[I,h("X"+P(o.formattedZoom),1)])]),s("div",{class:"fast-map__map-content-wrapper",style:M({opacity:i.opacity})},[n(c,{class:"fast-map__map-content",points:o.filteredPoints,playerPosition:o.playerPosition,initialZoomPercent:10,isShowGangZones:!0,isMobile:o.isMobile,destinationPointAvailable:i.cursorStatus||o.storedRoute&&o.storedRoute.length,disableDestinationPointCounter:i.disableDestinationPointCounter,isShowCheckpoint:!0,onZoom:e[0]||(e[0]=m=>i.currentZoom=m),onPointClick:o.getDirection,onPointRightClick:o.getDirection,onMapMouseUp:o.onClick},null,8,["points","playerPosition","isMobile","destinationPointAvailable","disableDestinationPointCounter","onPointClick","onPointRightClick","onMapMouseUp"])],4)])])}const F={mixins:[_],components:{MainMap:u,ControlsContaineredButton:y,ControlsClose:g},data(){return{KEY_CODE_ALT:window.KEY_CODE_ALT,cursorStatus:!1,currentZoom:1,opacity:.82,disableDestinationPointCounter:0}},computed:{storedRoute(){let t=this.$store.getters["player/route"];return t!==null&&(t=t.map(e=>[e[1],e[0]])),t},playerPosition(){return this.$store.getters["player/position"]},formattedZoom(){return this.currentZoom.toFixed(1)},isMobile(){return this.$root.isMobile},filteredPoints(){return this.map.points.filter(t=>t.type==l.BUSINESS&&t.show||t.type!=l.BUSINESS)}},created(){this.$data.noAdaptation=!0,this.map.points=d(this.addedPoints),window.setCursorStatus("FastMap",this.cursorStatus)},mounted(){window.stopVoiceRecord(),window.setCanOpenChat(!1)},unmounted(){window.setCursorStatus("FastMap",!1),window.setCanOpenChat(!0)},methods:{getDirection(t,e){this.disableDestinationPointCounter++,sendClientEvent(gm.EVENT_EXECUTE_PUBLIC,"GPS_OnPlayerGetDirection",e.position.x,e.position.y,e.position.z)},onClick(t){t.button===2&&this.showCursor()},showCursor(){this.cursorStatus||(this.cursorStatus=!0)},close(){window.closeInterface("FastMap")}},watch:{cursorStatus(t){window.setCursorStatus("FastMap",t)}}},at=b(F,[["render",Z],["__scopeId","data-v-286d265f"]]);export{at as default};
