import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
import { _ as __ } from './default-i18n.js';
import './index2.js';
import { d as defineCustomElement$2 } from './sc-alert2.js';
import { d as defineCustomElement$1 } from './sc-icon2.js';

const scDashboardModuleCss = ":host{display:block;position:relative}.dashboard-module{display:grid;gap:var(--sc-dashboard-module-spacing, 1em)}.heading{font-family:var(--sc-font-sans);display:flex;flex-wrap:wrap;gap:2em;align-items:center;justify-content:space-between}.heading__text{display:grid;flex:1;gap:calc(var(--sc-dashboard-module-spacing, 1em) / 2)}.heading__title{font-size:var(--sc-dashbaord-module-heading-size, var(--sc-font-size-x-large));font-weight:var(--sc-dashbaord-module-heading-weight, var(--sc-font-weight-bold));line-height:var(--sc-dashbaord-module-heading-line-height, var(--sc-line-height-dense))}.heading__description{font-size:var(--sc-font-size-normal);line-height:var(--sc-line-height-dense);color:var(--sc-color-gray-500)}";

const ScDashboardModule = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
  constructor() {
    super();
    this.__registerHost();
    this.__attachShadow();
  }
  render() {
    return (h("div", { class: "dashboard-module" }, !!this.error && (h("sc-alert", { open: !!this.error, type: "danger" }, h("span", { slot: "title" }, __('Error', 'surecart')), this.error)), h("div", { class: "heading" }, h("div", { class: "heading__text" }, h("div", { class: "heading__title", part: "heading-title" }, h("slot", { name: "heading" }, this.heading)), h("div", { class: "heading__description", part: "heading-description" }, h("slot", { name: "description" }))), h("slot", { name: "end" })), h("slot", null)));
  }
  static get style() { return scDashboardModuleCss; }
}, [1, "sc-dashboard-module", {
    "heading": [1],
    "error": [1]
  }]);
function defineCustomElement() {
  if (typeof customElements === "undefined") {
    return;
  }
  const components = ["sc-dashboard-module", "sc-alert", "sc-icon"];
  components.forEach(tagName => { switch (tagName) {
    case "sc-dashboard-module":
      if (!customElements.get(tagName)) {
        customElements.define(tagName, ScDashboardModule);
      }
      break;
    case "sc-alert":
      if (!customElements.get(tagName)) {
        defineCustomElement$2();
      }
      break;
    case "sc-icon":
      if (!customElements.get(tagName)) {
        defineCustomElement$1();
      }
      break;
  } });
}
defineCustomElement();

export { ScDashboardModule as S, defineCustomElement as d };
