import { Component, h, Prop, State } from '@stencil/core';
import { StateOfReminder } from '../../utils/utils';
export class DescriptionInput {
  componentWillRender() {
    this.status = this.state;
  }
  componentShouldUpdate() {
    this.status = this.state;
  }
  render() {
    if (this.status === StateOfReminder.create) {
      return (h("div", { class: "description-container" },
        h("div", { class: "title" }, "Descrizione"),
        h("textarea", { class: "textarea-create" })));
    }
    else if (this.status === StateOfReminder.view) {
      return (h("div", { class: "description-container-view" },
        h("textarea", { class: "textarea-view" }, this.text)));
    }
    else {
      return (h("div", { class: "description-container" },
        h("div", { class: "title" }, "Descrizione"),
        h("textarea", { class: "textarea-create" }, this.text)));
    }
  }
  static get is() { return "description-input"; }
  static get encapsulation() { return "shadow"; }
  static get originalStyleUrls() { return {
    "$": ["description-input.css"]
  }; }
  static get styleUrls() { return {
    "$": ["description-input.css"]
  }; }
  static get properties() { return {
    "state": {
      "type": "number",
      "mutable": false,
      "complexType": {
        "original": "StateOfReminder",
        "resolved": "StateOfReminder.create | StateOfReminder.edit | StateOfReminder.view",
        "references": {
          "StateOfReminder": {
            "location": "import",
            "path": "../../utils/utils"
          }
        }
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [],
        "text": ""
      },
      "attribute": "state",
      "reflect": false
    },
    "text": {
      "type": "string",
      "mutable": false,
      "complexType": {
        "original": "string",
        "resolved": "string",
        "references": {}
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [],
        "text": ""
      },
      "attribute": "text",
      "reflect": false
    }
  }; }
  static get states() { return {
    "status": {}
  }; }
}
