import { h } from "@stencil/core";
import { popoverController } from "@ionic/core";
import { _t } from "../i18n/i18n";
export class Basemaps {
  constructor() {
    this.selectBasemap = (e) => this.openPopover(e);
  }
  async openPopover(ev) {
    const options = {
      component: document.createElement("gl-basemap-switcher"),
      ev: ev,
    };
    const popover = await popoverController.create(options);
    await popover.present();
    return popover;
  }
  render() {
    let title = _t("webmapgl.basemaps.title");
    return (h("ion-button", { onClick: this.selectBasemap, title: title }, h("ion-icon", { slot: "icon-only", name: "earth" })));
  }
  static get is() { return "gl-basemaps"; }
  static get elementRef() { return "el"; }
}
//# sourceMappingURL=basemaps.js.map
