import{_ as C,a5 as M,r as V,o as h,y as I,q as s,v as d,p as i,P as c,x as r,n as S,s as x,ay as k,l as b,bv as B,a0 as N,a1 as O}from"./index.8d733f79.js";const D=t=>(N("data-v-5970f9f1"),t=t(),O(),t),$=D(()=>d("div",{id:"mapContainer"},null,-1)),j={style:{"margin-top":"10px"}},E=M({name:"PositionMapModal"}),J=Object.assign(E,{emits:["paramsChange"],setup(t,{expose:u,emit:f}){let o=null;const a=V(!1),_={rotate:50,tilt:30,distance:120};function m(e){a.value=!0,k(()=>{g(e)})}function g(e){o=new jsmap.JSMap({container:"mapContainer",mapServerURL:`/loadMap/org/${e.factoryId}`,showGlobe:!1,viewOptions:e.mapInfo?JSON.parse(e.mapInfo):_}),o.openMapById(e.id),o.on("loadComplete",()=>{console.log("Map loadComplete!",o.currentView)}),o.on("mapClickNode",n=>{console.log(n)})}function w(){f("paramsChange",o.currentView),l()}function l(){o&&(o.destroy(),o=null),a.value=!1}return u({showModal:m}),(e,n)=>{const p=b,v=B;return h(),I(v,{title:e.$t("mapDefaultView"),modelValue:S(a),"onUpdate:modelValue":n[0]||(n[0]=y=>x(a)?a.value=y:null),width:"800px","align-center":!0,"destroy-on-close":"","append-to-body":"",onClose:l},{footer:s(()=>[d("div",j,[i(p,{onClick:l},{default:s(()=>[c(r(e.$t("cancel")),1)]),_:1}),i(p,{type:"primary",onClick:w},{default:s(()=>[c(r(e.$t("confirm")),1)]),_:1})])]),default:s(()=>[$]),_:1},8,["title","modelValue"])}}}),R=C(J,[["__scopeId","data-v-5970f9f1"]]);export{R as default};
