"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../loadPlugins.js"),t=require("../mixins/mixins.js"),r=require("../../utils/amap-helpers.js"),i=require("../mixins/props.js"),a=require("../mixins/geometry.js"),s=require("../mixins/editable.js"),n=require("../../utils/equal.js");function u(e){if(!e)return;return e.map(e=>{const t=[],i=e.controlPoints;return i&&t.push(...i.map(e=>r.lngLat2Array(e))),t.push(r.lngLat2Array(e)),t})}var d=t.default(a.line,s.default).extend({name:"AmapBezierCurve",amapMeta:{initComponent:async(e,t)=>new e.BezierCurve(t),editable:{events:["end","adjust","addnode","removenode"],async loadEditor(){await e.default("AMap.BezierCurveEditor")},async initEditor(e,t,r){return new e.BezierCurveEditor(t,r,this.draggable)},onEdit(e){const t=e.target.getPath();this.$emit("update:path",u(t))}}},props:{path:i.defineProp({type:Array,setter(e,t){const r=e;if(this.$props.editable||this.$props.editable){const e=u(r.getPath());if(n.default(e,t))return}r.setPath(t)},getter:e=>u(e.getPath()),clone:!0,equals:n.default,events:["dragging","dragend"]})}});exports.default=d;
