import { Component, Element, h, Prop, State } from "@stencil/core";
import * as translation from "../../translation";
export class IntergiroAuthorizationHistoryCapture {
  componentWillLoad() {
    this.t = translation.create(this.element);
  }
  render() {
    return ((this.history.type == "capture" || this.history.type == "refund") && [
      h("section", null,
        h("smoothly-display", null, this.t("status")),
        h("smoothly-display", null, this.t(this.history.status))),
      h("section", null,
        h("smoothly-display", null, this.t("merchant")),
        h("smoothly-display", null, this.history.merchant)),
      h("section", null,
        h("smoothly-display", null, this.t("number")),
        h("smoothly-display", null, this.history.number)),
      this.history.status == "success" && (h("section", null,
        h("smoothly-display", null, this.t("reference")),
        h("smoothly-display", null, this.history.reference))),
      h("ig-authorization-history-error", { history: this.history }),
    ]);
  }
  static get is() { return "ig-authorization-history-capture"; }
  static get encapsulation() { return "scoped"; }
  static get originalStyleUrls() { return {
    "$": ["style.css"]
  }; }
  static get styleUrls() { return {
    "$": ["style.css"]
  }; }
  static get properties() { return {
    "history": {
      "type": "unknown",
      "mutable": false,
      "complexType": {
        "original": "Authorization.History",
        "resolved": "Fail | Pending | Settlement | Success",
        "references": {
          "Authorization": {
            "location": "import",
            "path": "@payfunc/model-acquirer"
          }
        }
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [],
        "text": ""
      }
    }
  }; }
  static get states() { return {
    "t": {}
  }; }
  static get elementRef() { return "element"; }
}
