import { Component, h, Prop, Event, } from "@stencil/core";
import getInvoiceTypes from "../../../helpers/getInvoiceTypes";
export class PopoverInvoiceSelect {
  constructor() {
    this.name = "type";
    this.options = getInvoiceTypes();
    this.value = "remediation";
  }
  render() {
    return (h("ion-content", { style: {
        "--background": "var(--ion-color-base)",
      } },
      h("ion-list", null, (this.options || []).map((option) => (h("ion-item", { detail: true, detailIcon: (option === null || option === void 0 ? void 0 : option.value) === this.value
          ? "checkmark-circle"
          : "chevron-forward", href: "#", onClick: (event) => {
          this.value = option === null || option === void 0 ? void 0 : option.value;
          this.floodteamSelect.emit({
            event,
            name: this.name,
            value: option,
          });
          this.floodteamClosePopover.emit({
            event,
          });
        } },
        h("ion-label", null, (option === null || option === void 0 ? void 0 : option.label) || (option === null || option === void 0 ? void 0 : option.value))))))));
  }
  static get is() { return "popover-invoice-select"; }
  static get originalStyleUrls() { return {
    "$": ["popover-invoice-select.css"]
  }; }
  static get styleUrls() { return {
    "$": ["popover-invoice-select.css"]
  }; }
  static get properties() { return {
    "name": {
      "type": "string",
      "mutable": false,
      "complexType": {
        "original": "string",
        "resolved": "string",
        "references": {}
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [],
        "text": ""
      },
      "attribute": "name",
      "reflect": false,
      "defaultValue": "\"type\""
    },
    "options": {
      "type": "unknown",
      "mutable": false,
      "complexType": {
        "original": "{\n    label: string;\n    value: InvoiceType;\n  }[]",
        "resolved": "{ label: string; value: InvoiceType; }[]",
        "references": {
          "InvoiceType": {
            "location": "import",
            "path": "../../../interfaces"
          }
        }
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [],
        "text": ""
      },
      "defaultValue": "getInvoiceTypes()"
    },
    "value": {
      "type": "string",
      "mutable": true,
      "complexType": {
        "original": "InvoiceType",
        "resolved": "\"content\" | \"mold\" | \"reconstruction\" | \"remediation\"",
        "references": {
          "InvoiceType": {
            "location": "import",
            "path": "../../../interfaces"
          }
        }
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [],
        "text": ""
      },
      "attribute": "value",
      "reflect": false,
      "defaultValue": "\"remediation\""
    }
  }; }
  static get events() { return [{
      "method": "floodteamSelect",
      "name": "floodteamSelect",
      "bubbles": true,
      "cancelable": true,
      "composed": true,
      "docs": {
        "tags": [],
        "text": ""
      },
      "complexType": {
        "original": "any",
        "resolved": "any",
        "references": {}
      }
    }, {
      "method": "floodteamClosePopover",
      "name": "floodteamClosePopover",
      "bubbles": true,
      "cancelable": true,
      "composed": true,
      "docs": {
        "tags": [],
        "text": ""
      },
      "complexType": {
        "original": "any",
        "resolved": "any",
        "references": {}
      }
    }]; }
}
//# sourceMappingURL=popover-invoice-select.js.map