import { Component, Element, Event, h, Prop, State } from "@stencil/core";
import * as translation from "./translation";
export class IntergiroNumberDetails {
  componentWillLoad() {
    this.t = translation.create(this.element);
  }
  render() {
    return [
      this.number && (h("section", null,
        h("dt", null, (this.name ? this.t(this.name) : "") + this.t(" number")),
        this.name == "subscription" ? (h("ig-display-edit", { name: "number", value: this.number, onChanged: (e) => this.numberUpdated.emit(e.detail) })) : (h("smoothly-display", null, this.number)))),
      this.identifier && (h("section", null,
        h("dt", null, this.name ? this.t(this.name) + this.t(" ID") : "ID"),
        h("smoothly-display", null, this.identifier))),
      this.reference && (h("section", null,
        h("dt", null, (this.name ? this.t(this.name) : "") + this.t(" reference")),
        h("smoothly-display", null, this.reference))),
    ];
  }
  static get is() { return "ig-number-details"; }
  static get encapsulation() { return "scoped"; }
  static get originalStyleUrls() { return {
    "$": ["style.css"]
  }; }
  static get styleUrls() { return {
    "$": ["style.css"]
  }; }
  static get properties() { return {
    "number": {
      "type": "string",
      "mutable": false,
      "complexType": {
        "original": "string",
        "resolved": "string",
        "references": {}
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [],
        "text": ""
      },
      "attribute": "number",
      "reflect": false
    },
    "identifier": {
      "type": "string",
      "mutable": false,
      "complexType": {
        "original": "string",
        "resolved": "string",
        "references": {}
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [],
        "text": ""
      },
      "attribute": "identifier",
      "reflect": false
    },
    "name": {
      "type": "string",
      "mutable": false,
      "complexType": {
        "original": "string",
        "resolved": "string | undefined",
        "references": {}
      },
      "required": false,
      "optional": true,
      "docs": {
        "tags": [],
        "text": ""
      },
      "attribute": "name",
      "reflect": false
    },
    "reference": {
      "type": "string",
      "mutable": false,
      "complexType": {
        "original": "string",
        "resolved": "string | undefined",
        "references": {}
      },
      "required": false,
      "optional": true,
      "docs": {
        "tags": [],
        "text": ""
      },
      "attribute": "reference",
      "reflect": false
    }
  }; }
  static get states() { return {
    "t": {}
  }; }
  static get events() { return [{
      "method": "numberUpdated",
      "name": "numberUpdated",
      "bubbles": true,
      "cancelable": true,
      "composed": true,
      "docs": {
        "tags": [],
        "text": ""
      },
      "complexType": {
        "original": "any",
        "resolved": "any",
        "references": {}
      }
    }]; }
  static get elementRef() { return "element"; }
}
