'use strict';

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

const index$1 = require('./index-df541290.js');
const index = require('./index-b7493032.js');
require('./_commonjsHelpers-10109b76.js');

const sv = {
  Amount: "Summa",
  "Add item": "Lägg till artikel",
};

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

const styleCss = ".sc-ig-total-amount-h{display:-ms-flexbox;display:flex}[hidden].sc-ig-total-amount-h{display:none}.sc-ig-total-amount-h>*.sc-ig-total-amount:first-child{-ms-flex-positive:1;flex-grow:1}smoothly-select.sc-ig-total-amount{margin-top:.25em}";

const IntergiroTotalAmount = class {
  constructor(hostRef) {
    index$1.registerInstance(this, hostRef);
    this.addItem = index$1.createEvent(this, "addItem", 7);
    this.currencies = [
      "SEK",
      "EUR",
      "USD",
      "DKK",
      "GBP",
      "ISK",
      "NOK",
      "AUD",
      "CAD",
      "JPY",
      "NZD",
      "CHF",
      "TRY",
      "PLN",
      "RUB",
    ];
    this.currency = "SEK";
    this.itemsvisible = false;
  }
  componentWillLoad() {
    this.t = create(this.element);
  }
  add(e) {
    this.addItem.emit(e);
  }
  render() {
    return [
      index$1.h("smoothly-input", { disabled: this.itemsvisible, type: "price", value: this.price, name: "price" }, this.t("Amount")),
      index$1.h("smoothly-select", { identifier: "currency", background: "transparent" }, this.currencies.map(option => this.currency == option ? (index$1.h("option", { value: option, selected: true }, option)) : (index$1.h("option", { value: option }, option)))),
      index$1.h("button", { type: "button", tabindex: "-1", onClick: e => this.add(e) }, index$1.h("smoothly-icon", { toolTip: this.t("Add item"), name: "add-circle-outline", fill: "clear", size: "medium", color: "medium" })),
    ];
  }
  get element() { return index$1.getElement(this); }
};
IntergiroTotalAmount.style = styleCss;

exports.ig_total_amount = IntergiroTotalAmount;
