webmapgl.loadBundle("17uef28y",["exports","./chunk-3944776d.js"],function(e,t){var n=window.webmapgl.h,a=function(){function e(){this.visible=!1,this.featureCount=0,this.cancelText=t._t("webmapgl.draw-toolbar.cancel"),this.color="primary",this.confirmText=t._t("webmapgl.draw-toolbar.confirm"),this.label=t._t("webmapgl.draw-toolbar.label"),this.maxFeatures=1,this.minFeatures=1}return e.prototype.handleDrawEnter=function(e){e.detail.mapId==this.mapId&&(this.featureCount=0,this.visible=!0)},e.prototype.handleDrawExit=function(e){e.detail.mapId==this.mapId&&(this.visible=!1)},e.prototype.handleDrawCreate=function(e){e.detail.mapId==this.mapId&&(this.featureCount+=1)},e.prototype.handleDrawDelete=function(e){e.detail.mapId==this.mapId&&(this.featureCount-=1)},e.prototype.cancel=function(){this.glDrawCancel.emit({mapId:this.mapId})},e.prototype.confirm=function(){this.glDrawConfirm.emit({mapId:this.mapId})},e.prototype.render=function(){var e=this;if(this.visible){var t=screen.width<=640,a=this.featureCount>=this.minFeatures&&this.featureCount<=this.maxFeatures;return n("ion-toolbar",{color:this.color},n("ion-title",null,this.label),n("ion-buttons",{slot:"end"},n("ion-button",{onClick:function(){e.cancel()}},n("ion-icon",{slot:t?"icon-only":"start",name:"close"}),t?null:this.cancelText),n("ion-button",{onClick:function(){a&&e.confirm()},disabled:!a},n("ion-icon",{slot:t?"icon-only":"start",name:"checkmark"}),t?null:this.confirmText)))}},Object.defineProperty(e,"is",{get:function(){return"gl-draw-toolbar"},enumerable:!0,configurable:!0}),Object.defineProperty(e,"properties",{get:function(){return{cancelText:{type:String,attr:"cancel-text"},color:{type:String,attr:"color"},confirmText:{type:String,attr:"confirm-text"},featureCount:{state:!0},label:{type:String,attr:"label"},mapId:{type:String,attr:"map-id"},maxFeatures:{type:Number,attr:"max-features"},minFeatures:{type:Number,attr:"min-features"},visible:{state:!0}}},enumerable:!0,configurable:!0}),Object.defineProperty(e,"events",{get:function(){return[{name:"glDrawCancel",method:"glDrawCancel",bubbles:!0,cancelable:!0,composed:!0},{name:"glDrawConfirm",method:"glDrawConfirm",bubbles:!0,cancelable:!0,composed:!0}]},enumerable:!0,configurable:!0}),Object.defineProperty(e,"listeners",{get:function(){return[{name:"body:glDrawEnter",method:"handleDrawEnter"},{name:"body:glDrawExit",method:"handleDrawExit"},{name:"body:glDrawCreate",method:"handleDrawCreate"},{name:"body:glDrawDelete",method:"handleDrawDelete"}]},enumerable:!0,configurable:!0}),e}();e.GlDrawToolbar=a,Object.defineProperty(e,"__esModule",{value:!0})});