import { Component, Element, h, Prop, State } from "@stencil/core";
import { Name } from "@payfunc/model";
import * as translation from "./translation";
export class IntergiroOrderContact {
  componentWillLoad() {
    this.t = translation.create(this.element);
  }
  render() {
    return !this.contact || Object.values(this.contact).length < 1 ? (h("p", null, this.t("There is no contact information available."))) : ([
      this.contact.name && (h("section", null,
        h("dt", null, this.t("Name")),
        h("smoothly-display", { type: "text", value: Name.get(this.contact.name) }))),
      this.contact.email && (h("section", null,
        h("dt", null, this.t("Email")),
        h("ig-email-addresses", { editable: false, value: this.contact.email }))),
      this.contact.phone && (h("section", null,
        h("dt", null, this.t("Phone")),
        h("ig-phone-numbers", { editable: false, value: this.contact.phone }))),
    ]);
  }
  static get is() { return "ig-order-contact"; }
  static get encapsulation() { return "scoped"; }
  static get originalStyleUrls() { return {
    "$": ["style.css"]
  }; }
  static get styleUrls() { return {
    "$": ["style.css"]
  }; }
  static get properties() { return {
    "contact": {
      "type": "unknown",
      "mutable": false,
      "complexType": {
        "original": "Contact",
        "resolved": "Contact | undefined",
        "references": {
          "Contact": {
            "location": "import",
            "path": "@payfunc/model"
          }
        }
      },
      "required": false,
      "optional": true,
      "docs": {
        "tags": [],
        "text": ""
      }
    }
  }; }
  static get states() { return {
    "t": {}
  }; }
  static get elementRef() { return "element"; }
}
