import { Component, Event, h, Prop } from "@stencil/core";
export class InputTotallerType {
  constructor() {
    this.labelPosition = "stacked";
    this.name = "type";
    this.placeholder = "Type";
    this.options = [
      {
        label: "Year",
        value: "year",
      },
      {
        label: "Quarter",
        value: "quarter",
      },
      {
        label: "Month",
        value: "month",
      },
      {
        label: "Week",
        value: "week",
      },
      {
        label: "Day",
        value: "day",
      },
    ];
    this.required = false;
  }
  render() {
    return (h("ion-item", { style: { overflow: "visible" } },
      h("ion-label", { position: this.labelPosition }, this.label),
      h("input", { required: this.required, onInput: (event) => {
          var _a;
          this.value = (_a = event === null || event === void 0 ? void 0 : event.target) === null || _a === void 0 ? void 0 : _a.value;
          this.ionInput.emit({
            name: this.name,
            value: this.value,
            event,
          });
        }, onChange: (event) => {
          var _a;
          this.value = (_a = event === null || event === void 0 ? void 0 : event.target) === null || _a === void 0 ? void 0 : _a.value;
          this.ionChange.emit({
            name: this.name,
            value: this.value,
            event,
          });
        }, style: {
          border: "none",
          background: "transparent",
        }, list: this.list || this.name, name: this.name, placeholder: this.placeholder, value: this.value }),
      h("datalist", { id: this.list || this.name }, (this.options || []).map((option) => (h("option", null, option === null || option === void 0 ? void 0 : option.value))))));
  }
  static get is() { return "floodteam-input-totaller-type"; }
  static get properties() { return {
    "label": {
      "type": "string",
      "mutable": false,
      "complexType": {
        "original": "string",
        "resolved": "string",
        "references": {}
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [],
        "text": ""
      },
      "attribute": "label",
      "reflect": false
    },
    "labelPosition": {
      "type": "string",
      "mutable": false,
      "complexType": {
        "original": "\"stacked\" | \"fixed\" | \"floating\"",
        "resolved": "\"fixed\" | \"floating\" | \"stacked\"",
        "references": {}
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [],
        "text": ""
      },
      "attribute": "label-position",
      "reflect": false,
      "defaultValue": "\"stacked\""
    },
    "name": {
      "type": "string",
      "mutable": false,
      "complexType": {
        "original": "string",
        "resolved": "string",
        "references": {}
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [],
        "text": ""
      },
      "attribute": "name",
      "reflect": false,
      "defaultValue": "\"type\""
    },
    "list": {
      "type": "string",
      "mutable": false,
      "complexType": {
        "original": "string",
        "resolved": "string",
        "references": {}
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [],
        "text": ""
      },
      "attribute": "list",
      "reflect": false
    },
    "placeholder": {
      "type": "string",
      "mutable": false,
      "complexType": {
        "original": "string",
        "resolved": "string",
        "references": {}
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [],
        "text": ""
      },
      "attribute": "placeholder",
      "reflect": false,
      "defaultValue": "\"Type\""
    },
    "options": {
      "type": "unknown",
      "mutable": false,
      "complexType": {
        "original": "{ label: string; value: any }[]",
        "resolved": "{ label: string; value: any; }[]",
        "references": {}
      },
      "required": false,
      "optional": true,
      "docs": {
        "tags": [],
        "text": ""
      },
      "defaultValue": "[\n    {\n      label: \"Year\",\n      value: \"year\",\n    },\n    {\n      label: \"Quarter\",\n      value: \"quarter\",\n    },\n    {\n      label: \"Month\",\n      value: \"month\",\n    },\n    {\n      label: \"Week\",\n      value: \"week\",\n    },\n    {\n      label: \"Day\",\n      value: \"day\",\n    },\n  ]"
    },
    "value": {
      "type": "any",
      "mutable": false,
      "complexType": {
        "original": "any",
        "resolved": "any",
        "references": {}
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [],
        "text": ""
      },
      "attribute": "value",
      "reflect": false
    },
    "required": {
      "type": "boolean",
      "mutable": false,
      "complexType": {
        "original": "boolean",
        "resolved": "boolean",
        "references": {}
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [],
        "text": ""
      },
      "attribute": "required",
      "reflect": false,
      "defaultValue": "false"
    }
  }; }
  static get events() { return [{
      "method": "ionInput",
      "name": "ionInput",
      "bubbles": true,
      "cancelable": true,
      "composed": true,
      "docs": {
        "tags": [],
        "text": ""
      },
      "complexType": {
        "original": "any",
        "resolved": "any",
        "references": {}
      }
    }, {
      "method": "ionChange",
      "name": "ionChange",
      "bubbles": true,
      "cancelable": true,
      "composed": true,
      "docs": {
        "tags": [],
        "text": ""
      },
      "complexType": {
        "original": "any",
        "resolved": "any",
        "references": {}
      }
    }]; }
}
