text: import{_ as F,d as L,w as l}from"./app.e8329c2e.js";import{u as G}from"./useBaseMapEffect.90e9ccd0.js";import{b as D}from"./bindEvents.81d30a10.js";import{u as R}from"./useLife.970079a8.js";const T=L({props:{path:null,strokeColor:{default:"#000"},strokeWeight:{default:2},strokeOpacity:{default:1},strokeStyle:{default:"solid"},fillColor:{default:"#fff"},fillOpacity:{default:.3},enableMassClear:{type:Boolean},enableEditing:{type:Boolean},enableClicking:{type:Boolean},geodesic:{type:Boolean,default:!1},clip:{type:Boolean,default:!0},onClick:null,onDblclick:null,onMousedown:null,onMouseup:null,onMouseout:null,onMouseover:null,onRemove:null,onLineupdate:null},emits:["initd","unload","click","dblclick","mousedown","mouseup","mouseout","mouseover","remove","lineupdate"],setup(a,{emit:r}){const o=a,{ready:u}=R();let t;G(e=>{if(!o.path.length)return;const n=()=>{e.removeOverlay(t)},i=()=>{const{path:b,strokeColor:h,strokeWeight:M,strokeOpacity:S,strokeStyle:O,fillOpacity:v,fillColor:_,enableMassClear:B,enableEditing:E,enableClicking:P,geodesic:w,clip:x}=o,W=s(b);t=new BMapGL.Polygon(W,{strokeColor:h,strokeWeight:M,strokeOpacity:S,strokeStyle:O,fillOpacity:v,fillColor:_,enableMassClear:B,enableEditing:E,enableClicking:P,geodesic:w,clip:x}),e.addOverlay(t),D(o,r,t)};return l(()=>o.path,()=>c,{deep:!0}),l(()=>o.strokeColor,()=>p),l(()=>o.strokeOpacity,()=>d),l(()=>o.fillColor,()=>f),l(()=>o.fillOpacity,()=>k),l(()=>o.strokeWeight,()=>y),l(()=>o.strokeStyle,()=>C),l(()=>o.enableMassClear,()=>g),l(()=>o.enableEditing,()=>m),i(),u(e),n});function s(e){return e.map(({lng:n,lat:i})=>new BMapGL.Point(n,i))}function c(e){t.setPath(s(e))}function p(e){t.setStrokeColor(e)}function f(e){t.setFillColor(e)}function d(e){t.setStrokeOpacity(e)}function k(e){t.setFillOpacity(e)}function y(e){t.setStrokeWeight(e)}function C(e){t.setStrokeStyle(e)}function g(e){e?t.enableMassClear():t.disableMassClear()}function m(e){e?t.enableEditing():t.disableEditing()}return(e,n)=>null}});var H=F(T,[["__file","index.vue"]]);export{H as default};
  