import*as tslib_1 from"../polyfills/tslib.js";import{h}from"../webmapgl.core.js";import{a as _t}from"./chunk-cf921ba9.js";import{a as getMap}from"./chunk-853b4351.js";var Drawer=function(){function t(){this.open=!1}return t.prototype.componentDidUpdate=function(){getMap(this.mapId).resizeMap()},t.prototype.toggle=function(){this.open=!this.open},t.prototype.hostData=function(){return{class:{"gl-drawer-closed":!this.open,"gl-drawer-open":this.open}}},t.prototype.render=function(){var t=this;return[h("ion-header",null,h("ion-toolbar",null,h("ion-buttons",{slot:"start"},h("slot",{name:"toolbar-start-buttons"})),h("ion-title",null,this.drawerTitle),h("ion-buttons",{slot:"end"},h("slot",{name:"toolbar-end-buttons"}),h("ion-button",{title:"Close",onClick:function(){t.open=!1}},h("ion-icon",{slot:"icon-only",name:"close"}))))),h("ion-content",null,h("slot",null))]},Object.defineProperty(t,"is",{get:function(){return"gl-drawer"},enumerable:!0,configurable:!0}),Object.defineProperty(t,"properties",{get:function(){return{content:{state:!0},drawerTitle:{type:String,attr:"drawer-title",mutable:!0},mapId:{type:String,attr:"map-id"},open:{type:Boolean,attr:"open",mutable:!0},toggle:{method:!0}}},enumerable:!0,configurable:!0}),Object.defineProperty(t,"style",{get:function(){return"gl-drawer{-ms-flex-direction:column;flex-direction:column;height:50%}gl-drawer.gl-drawer-closed{display:none}gl-drawer.gl-drawer-open{display:-ms-flexbox;display:flex}gl-drawer ion-content{height:100%}"},enumerable:!0,configurable:!0}),t}(),DrawerToggle=function(){function t(){this.icon="settings",this.buttonTitle=_t("webmapgl.drawer-toggle.label")}return t.prototype.componentWillLoad=function(){return tslib_1.__awaiter(this,void 0,void 0,function(){var t;return tslib_1.__generator(this,function(e){switch(e.label){case 0:return t=this,[4,this.lazyDrawer.componentOnReady()];case 1:return t.drawer=e.sent(),[2]}})})},t.prototype.toggleDrawer=function(){this.drawer.open=!this.drawer.open},t.prototype.render=function(){var t=this;return h("ion-button",{onClick:function(){return t.toggleDrawer()},title:this.buttonTitle},h("ion-icon",{slot:"icon-only",name:this.icon}))},Object.defineProperty(t,"is",{get:function(){return"gl-drawer-toggle"},enumerable:!0,configurable:!0}),Object.defineProperty(t,"properties",{get:function(){return{buttonTitle:{type:String,attr:"button-title"},el:{elementRef:!0},icon:{type:String,attr:"icon"},lazyDrawer:{connect:"gl-drawer"}}},enumerable:!0,configurable:!0}),t}();export{Drawer as GlDrawer,DrawerToggle as GlDrawerToggle};