import { r as registerInstance, j as createEvent, h, g as getElement } from './index-07845439.js';
import { d as dist } from './index-63517df5.js';
import './_commonjsHelpers-8fe71198.js';

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

function create(language) {
  return 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) {
    registerInstance(this, hostRef);
    this.addItem = 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 [
      h("smoothly-input", { disabled: this.itemsvisible, type: "price", value: this.price, name: "price" }, this.t("Amount")),
      h("smoothly-select", { identifier: "currency", background: "transparent" }, this.currencies.map(option => this.currency == option ? (h("option", { value: option, selected: true }, option)) : (h("option", { value: option }, option)))),
      h("button", { type: "button", tabindex: "-1", onClick: e => this.add(e) }, h("smoothly-icon", { toolTip: this.t("Add item"), name: "add-circle-outline", fill: "clear", size: "medium", color: "medium" })),
    ];
  }
  get element() { return getElement(this); }
};
IntergiroTotalAmount.style = styleCss;

export { IntergiroTotalAmount as ig_total_amount };
