System.register(["./p-b236363f.system.js","./p-1939e1c4.system.js"],function(t){"use strict";var i,e,n,r;return{setters:[function(t){i=t.r;e=t.e;n=t.h},function(t){r=t._}],execute:function(){var o=function(){function t(t){i(this,t);this.visible=false;this.featureCount=0;this.cancelText=r("webmapgl.draw-toolbar.cancel");this.color="primary";this.confirmText=r("webmapgl.draw-toolbar.confirm");this.label=r("webmapgl.draw-toolbar.label");this.maxFeatures=1;this.minFeatures=1;this.glDrawCancel=e(this,"glDrawCancel",7);this.glDrawConfirm=e(this,"glDrawConfirm",7)}t.prototype.handleDrawEnter=function(t){if(t.detail.mapId!=this.mapId)return;this.featureCount=0;this.visible=true};t.prototype.handleDrawExit=function(t){if(t.detail.mapId!=this.mapId)return;this.visible=false};t.prototype.handleDrawCreate=function(t){if(t.detail.mapId!=this.mapId)return;this.featureCount+=1};t.prototype.handleDrawDelete=function(t){if(t.detail.mapId!=this.mapId)return;this.featureCount-=1};t.prototype.cancel=function(){this.glDrawCancel.emit({mapId:this.mapId})};t.prototype.confirm=function(){this.glDrawConfirm.emit({mapId:this.mapId})};t.prototype.render=function(){var t=this;if(!this.visible)return;var i=screen.width<=640;var e=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(){t.cancel()}},n("ion-icon",{slot:i?"icon-only":"start",name:"close"}),i?null:this.cancelText),n("ion-button",{onClick:function(){if(e)t.confirm()},disabled:!e},n("ion-icon",{slot:i?"icon-only":"start",name:"checkmark"}),i?null:this.confirmText)))};return t}();t("gl_draw_toolbar",o)}}});