import { Component, Event, Prop, h } from '@stencil/core';
export class PopoverControls {
  constructor() {
    /**
     * The list of buttons to show when the material button is clicked
     */
    this.buttonList = [];
  }
  render() {
    return (h("ion-content", null,
      h("ion-list", null, this.buttonList.map((mb) => (h("ion-item", { detail: true, lines: "full", href: (mb === null || mb === void 0 ? void 0 : mb.href) || "#", onClick: (event) => {
          if (typeof (mb === null || mb === void 0 ? void 0 : mb.onClick) !== "function")
            return;
          mb.onClick(event);
          this.floodteamClosePopover.emit({ event });
        } },
        h("ion-icon", { color: mb === null || mb === void 0 ? void 0 : mb.color, name: mb.icon.indexOf("/") === -1 ? mb.icon : null, src: mb.icon.indexOf("/") === -1 ? null : mb.icon, slot: "start" }),
        h("ion-label", { color: mb === null || mb === void 0 ? void 0 : mb.color, innerHTML: mb.label })))))));
  }
  static get is() { return "floodteam-popover-controls"; }
  static get originalStyleUrls() { return {
    "$": ["popover-controls.css"]
  }; }
  static get styleUrls() { return {
    "$": ["popover-controls.css"]
  }; }
  static get properties() { return {
    "buttonList": {
      "type": "unknown",
      "mutable": false,
      "complexType": {
        "original": "{\n        /**\n         * The label to show next to the button\n         */\n        label: string;\n        /**\n         * The icon to use in the button\n         */\n        icon: string;\n        /**\n         * The color from the theme to make the button\n         */\n        color?: Color;\n        /**\n         * The link to use for the button\n         */\n        href?: string;\n        /**\n         * The functionality to run when the button is clicked\n         */\n        onClick?: (event: any) => any;\n    }[]",
        "resolved": "{ label: string; icon: string; color?: string; href?: string; onClick?: (event: any) => any; }[]",
        "references": {
          "Color": {
            "location": "import",
            "path": "@ionic/core"
          }
        }
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [],
        "text": "The list of buttons to show when the material button is clicked"
      },
      "defaultValue": "[]"
    }
  }; }
  static get events() { return [{
      "method": "floodteamClosePopover",
      "name": "floodteamClosePopover",
      "bubbles": true,
      "cancelable": true,
      "composed": true,
      "docs": {
        "tags": [],
        "text": ""
      },
      "complexType": {
        "original": "any",
        "resolved": "any",
        "references": {}
      }
    }]; }
}
