"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../loadPlugins.js"),o=require("../mixins/mixins.js"),t=require("../../utils/amap-helpers.js"),i=require("../mixins/props.js"),n=require("../mixins/methods.js"),r=require("./base.js");function a(e){return function(o,t){if(void 0===t)return;o[`${t?"show":"hide"}${e}`]()}}var d=o.default(r.default).extend({name:"AmapToolBar",amapMeta:{prepare:()=>e.default("AMap.ToolBar"),initComponent:async(e,o)=>new e.ToolBar(o),events:["location","zoomchanged"]},props:{visible:i.defineProp({type:Boolean,default:!0,setter(e,o){const t=e;o?t.show():t.hide()}}),position:{type:String,validator:e=>r.ControlPositions.includes(e)},ruler:i.defineProp({type:Boolean,default:void 0,setter:a("Ruler")}),direction:i.defineProp({type:Boolean,default:void 0,setter:a("Direction")}),locate:i.defineProp({type:Boolean,default:void 0,setter:a("Location")}),noIpLocale:{type:Boolean,default:void 0},liteStyle:{type:Boolean,default:void 0},autoPosition:{type:Boolean,default:void 0}},methods:{show:n.defineMethod("show"),hide:n.defineMethod("hide"),doLocation:n.defineMethod("doLocation"),getLocation(){const e=this.context.component.getLocation();if(e)return t.lngLat2Array(e)}}});exports.default=d;
