const t=window.webmapgl.h;import{a as e}from"./chunk-4fdec815.js";import{a as o}from"./chunk-0359b4ed.js";class n{constructor(){this.open=!1}componentDidUpdate(){o(this.mapId).resizeMap()}toggle(){this.open=!this.open}hostData(){return{class:{"gl-drawer-closed":!this.open,"gl-drawer-open":this.open}}}render(){return[t("ion-header",null,t("ion-toolbar",null,t("ion-buttons",{slot:"start"},t("slot",{name:"toolbar-start-buttons"})),t("ion-title",null,this.drawerTitle),t("ion-buttons",{slot:"end"},t("slot",{name:"toolbar-end-buttons"}),t("ion-button",{title:"Close",onClick:()=>{this.open=!1}},t("ion-icon",{slot:"icon-only",name:"close"}))))),t("ion-content",null,t("slot",null))]}static get is(){return"gl-drawer"}static get properties(){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}}}static get style(){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%}"}}class r{constructor(){this.icon="settings",this.buttonTitle=e("webmapgl.drawer-toggle.label")}async componentWillLoad(){this.drawer=await this.lazyDrawer.componentOnReady()}toggleDrawer(){this.drawer.open=!this.drawer.open}render(){return t("ion-button",{onClick:()=>this.toggleDrawer(),title:this.buttonTitle},t("ion-icon",{slot:"icon-only",name:this.icon}))}static get is(){return"gl-drawer-toggle"}static get properties(){return{buttonTitle:{type:String,attr:"button-title"},el:{elementRef:!0},icon:{type:String,attr:"icon"},lazyDrawer:{connect:"gl-drawer"}}}}export{n as GlDrawer,r as GlDrawerToggle};