import { Component, h, Host, Prop } from '@stencil/core';
export class DvnFieldDisplayRange {
  render() {
    const { field, value } = this;
    const options = [];
    for (let i = field.min; i <= field.max; i += field.step) {
      options.push(i);
    }
    if (field.inputType === 'stars') {
      return (h(Host, { class: "d-block" },
        h("dvn-rating-stars", { disabled: true, options: options, readonly: true, value: value })));
    }
    return (h(Host, { class: "d-block" }, value));
  }
  static get is() { return "dvn-field-display-range"; }
  static get properties() { return {
    "value": {
      "type": "number",
      "mutable": false,
      "complexType": {
        "original": "number",
        "resolved": "number",
        "references": {}
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [],
        "text": ""
      },
      "attribute": "value",
      "reflect": false
    },
    "field": {
      "type": "unknown",
      "mutable": false,
      "complexType": {
        "original": "RangeField",
        "resolved": "RangeField",
        "references": {
          "RangeField": {
            "location": "import",
            "path": "@dvn/core/doldurma/src/fields/range"
          }
        }
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [],
        "text": ""
      }
    }
  }; }
}
