'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

const index$1 = require('./index-df541290.js');
const index$2 = require('./index-c12b8888.js');
const index = require('./index-b7493032.js');
require('./index-0b6f1dd9.js');
require('./_commonjsHelpers-10109b76.js');
require('./index-fe328b96.js');

const sv = {
  Scheme: "System",
  Number: "Nummer",
  Expires: "Giltigt t.o.m.",
  Type: "Typ",
  card: "kort",
  Method: "Metod",
  Contact: "Kontakt",
  Message: "Meddelande",
  "Open link": "Öppna länk",
  defer: "skickad",
  link: "länk",
};

function create(language) {
  return index.dist.create({
    sv,
  }, language);
}

const styleCss = "*.sc-ig-order-payment-h{display:-ms-flexbox;display:flex}[hidden].sc-ig-order-payment-h{display:none}.sc-ig-order-payment-h>span.sc-ig-order-payment{-ms-flex-positive:1;flex-grow:1;padding-left:0.6em;padding-right:0.6em}ul.sc-ig-order-payment{width:100%;list-style-type:none;margin-top:0;margin-bottom:0;-webkit-padding-start:0;padding-inline-start:0}summary.sc-ig-order-payment{outline:none;text-align:left}dl.sc-ig-order-payment{margin:8px;width:100%;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-wrap:wrap;flex-wrap:wrap;max-height:3em;-ms-flex-pack:start;justify-content:flex-start}dt.sc-ig-order-payment{font-weight:bold;text-align:left}dd.sc-ig-order-payment{text-align:left;margin:0}dd.icon.sc-ig-order-payment{width:-webkit-max-content;width:-moz-max-content;width:max-content;padding-top:0.5em}";

const IntergirOrderPayment = class {
  constructor(hostRef) {
    index$1.registerInstance(this, hostRef);
  }
  componentWillLoad() {
    this.t = create(this.element);
  }
  render() {
    const t = this.t;
    return (index$1.h("ul", null, index$1.h("li", null, this.order.payment.type == "card" ? (index$1.h("summary", null, index$1.h("dl", null, this.order.payment.type ? [index$1.h("dt", null, t("Type")), index$1.h("dd", null, t(this.order.payment.type))] : "", this.order.payment.scheme ? [index$1.h("dt", null, t("Scheme")), index$1.h("dd", null, this.order.payment.scheme)] : "", index$2.Payment.Card.is(this.order.payment)
      ? [
        index$1.h("dt", null, t("Number")),
        index$1.h("dd", null, this.order.payment.iin.substring(0, 4) +
          " " +
          this.order.payment.iin.substring(4) +
          "** **** " +
          this.order.payment.last4),
      ]
      : "", this.order.payment.expires
      ? [
        index$1.h("dt", null, t("Expires")),
        index$1.h("dd", null, this.order.payment.expires[0], "/", this.order.payment.expires[1]),
      ]
      : ""))) : this.order.payment.type == "defer" ? (index$1.h("summary", null, index$1.h("dl", null, this.order.payment.type ? [index$1.h("dt", null, t("Type")), index$1.h("dd", null, t(this.order.payment.type))] : "", this.order.payment.method ? [index$1.h("dt", null, t("Method")), index$1.h("dd", null, t(this.order.payment.method))] : "", this.order.payment.contact ? [index$1.h("dt", null, t("Contact")), index$1.h("dd", null, this.order.payment.contact)] : "", this.order.payment.message ? [index$1.h("dt", null, t("Message")), index$1.h("dd", null, this.order.payment.message)] : "", index$2.Payment.Defer.is(this.order.payment) && this.order.payment.link != undefined
      ? [
        index$1.h("dt", null),
        index$1.h("dd", { class: "icon" }, index$1.h("a", { target: "_blank", href: this.order.payment.link }, index$1.h("smoothly-icon", { toolTip: t("Open link"), name: "open" }))),
      ]
      : ""))) : ("No payment information available."))));
  }
  get element() { return index$1.getElement(this); }
};
IntergirOrderPayment.style = styleCss;

exports.ig_order_payment = IntergirOrderPayment;
