import { State } from "@ionic/core/dist/types/stencil-public-runtime";
import { Component, h, Prop, Event, } from "@stencil/core";
export class PopoverUserSelect {
  constructor() {
    this.users = [];
    this.header = "Select a User";
    this.name = "user";
    this.loading = false;
  }
  render() {
    return (h("ion-content", { class: {
        "is-loading": this.loading,
      }, style: {
        "--background": "var(--ion-color-base)",
      } },
      h("ion-list", { class: "ion-no-padding" },
        h("ion-item-divider", null, this.header),
        (this.users || []).map((user) => (h("floodteam-item-user", { onClick: (event) => {
            this.loading = true;
            this.floodteamSelect.emit({ event, user, name: this.name });
          }, disabled: true, user: user, jobId: this.jobId }))))));
  }
  static get is() { return "popover-user-select"; }
  static get properties() { return {
    "users": {
      "type": "unknown",
      "mutable": false,
      "complexType": {
        "original": "User[]",
        "resolved": "User[]",
        "references": {
          "User": {
            "location": "import",
            "path": "../../../sdk"
          }
        }
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [],
        "text": ""
      },
      "defaultValue": "[]"
    },
    "jobId": {
      "type": "string",
      "mutable": false,
      "complexType": {
        "original": "string",
        "resolved": "string",
        "references": {}
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [],
        "text": ""
      },
      "attribute": "job-id",
      "reflect": false
    },
    "header": {
      "type": "string",
      "mutable": false,
      "complexType": {
        "original": "string",
        "resolved": "string",
        "references": {}
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [],
        "text": ""
      },
      "attribute": "header",
      "reflect": false,
      "defaultValue": "\"Select a User\""
    },
    "name": {
      "type": "string",
      "mutable": false,
      "complexType": {
        "original": "string",
        "resolved": "string",
        "references": {}
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [],
        "text": ""
      },
      "attribute": "name",
      "reflect": false,
      "defaultValue": "\"user\""
    }
  }; }
  static get states() { return {
    "loading": {}
  }; }
  static get events() { return [{
      "method": "floodteamSelect",
      "name": "floodteamSelect",
      "bubbles": true,
      "cancelable": true,
      "composed": true,
      "docs": {
        "tags": [],
        "text": ""
      },
      "complexType": {
        "original": "any",
        "resolved": "any",
        "references": {}
      }
    }]; }
}
//# sourceMappingURL=popover-user-select.js.map