'use strict';

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

const index = require('./index-140bcbcd.js');
const index$1 = require('./index-d30056b8.js');
require('./index-d3079b93.js');
require('./_commonjsHelpers-537d719a.js');

const styleCss = ".sc-ig-authorization-history-error-h{width:100%}.sc-ig-authorization-history-error-h>smoothly-display.sc-ig-authorization-history-error:first-of-type,.sc-ig-authorization-history-error-h>details.sc-ig-authorization-history-error>content.sc-ig-authorization-history-error>smoothly-display.sc-ig-authorization-history-error:first-of-type{font-weight:bold;text-transform:capitalize}.sc-ig-authorization-history-error-h>details.sc-ig-authorization-history-error>summary.sc-ig-authorization-history-error{cursor:pointer}.sc-ig-authorization-history-error-h>details.sc-ig-authorization-history-error>summary.sc-ig-authorization-history-error,.sc-ig-authorization-history-error-h>smoothly-display.sc-ig-authorization-history-error{text-transform:capitalize}.sc-ig-authorization-history-error-h>section.sc-ig-authorization-history-error>*.sc-ig-authorization-history-error:last-child{white-space:normal}.sc-ig-authorization-history-error-h>details.sc-ig-authorization-history-error>content.sc-ig-authorization-history-error{display:-ms-flexbox;display:flex}.sc-ig-authorization-history-error-h>details.sc-ig-authorization-history-error>content.sc-ig-authorization-history-error>section.sc-ig-authorization-history-error{margin-left:0.5em}";

const IntergiroAuthorizationHistoryError = class {
  constructor(hostRef) {
    index.registerInstance(this, hostRef);
  }
  componentWillLoad() {
    this.t = index$1.create(this.element);
  }
  render() {
    return ("error" in this.history && [
      index.h("smoothly-display", null, this.t("error")),
      index.h("smoothly-display", null, this.history.error.status + " " + this.history.error.type),
      this.history.error.header && index.h("smoothly-display", null, this.history.error.header),
      this.history.error.body && index.h("smoothly-display", null, this.history.error.body),
      this.history.error.error && index.h("smoothly-display", null, this.history.error.error),
      index.h("details", null, index.h("summary", null, this.t("details")), Object.entries(this.history.error).map(value => [
        index.h("content", null, index.h("smoothly-display", { type: "text", value: value[0] + ": " }), index.h("section", null, typeof value[1] == "object" ? (Object.entries(value[1]).map(value => (index.h("smoothly-display", { type: "text", value: value[0] + ": " + value[1] })))) : (index.h("smoothly-display", { type: "text", value: value[1].toString() })))),
      ])),
    ]);
  }
  get element() { return index.getElement(this); }
};
IntergiroAuthorizationHistoryError.style = styleCss;

exports.ig_authorization_history_error = IntergiroAuthorizationHistoryError;
