import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';

const scTabPanelCss = ":host{--padding:0;--spacing:var(--sc-spacing-large);display:block}::slotted(*~*){margin-top:var(--spacing)}.tab-panel{border:solid 1px transparent;padding:var(--padding);font-family:var(--sc-font-sans);font-size:var(--sc-font-size-medium)}";

let id = 0;
const ScTabPanel$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
  constructor() {
    super();
    this.__registerHost();
    this.__attachShadow();
    this.componentId = `tab-panel-${++id}`;
    /** The tab panel's name. */
    this.name = '';
    /** When true, the tab panel will be shown. */
    this.active = false;
  }
  render() {
    // If the user didn't provide an ID, we'll set one so we can link tabs and tab panels with aria labels
    this.el.id = this.el.id || this.componentId;
    return (h(Host, { style: { display: this.active ? 'block' : 'none' } }, h("div", { part: "base", class: "tab-panel", role: "tabpanel", "aria-hidden": this.active ? 'false' : 'true' }, h("slot", null))));
  }
  get el() { return this; }
  static get style() { return scTabPanelCss; }
}, [1, "sc-tab-panel", {
    "name": [513],
    "active": [516]
  }]);
function defineCustomElement$1() {
  if (typeof customElements === "undefined") {
    return;
  }
  const components = ["sc-tab-panel"];
  components.forEach(tagName => { switch (tagName) {
    case "sc-tab-panel":
      if (!customElements.get(tagName)) {
        customElements.define(tagName, ScTabPanel$1);
      }
      break;
  } });
}
defineCustomElement$1();

const ScTabPanel = ScTabPanel$1;
const defineCustomElement = defineCustomElement$1;

export { ScTabPanel, defineCustomElement };
