import { r as registerInstance, d as createEvent, h } from './index-31949dc5.js';

const InputTotallerType = class {
  constructor(hostRef) {
    registerInstance(this, hostRef);
    this.ionInput = createEvent(this, "ionInput", 7);
    this.ionChange = createEvent(this, "ionChange", 7);
    this.label = undefined;
    this.labelPosition = "stacked";
    this.name = "type";
    this.list = undefined;
    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.value = undefined;
    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))))));
  }
};

export { InputTotallerType as floodteam_input_totaller_type };
