import { r as c, h as e, H as i, g as o } from "./index.61732cef.js";
import { c as n } from "./index-orsBiyT_.fc4357c3.js";
import { v as b } from "./v4-DD3477fe.2624487e.js";
import "react";
import "react-dom";
const f = () => ":host{display:block;width:100%}:host *{box-sizing:border-box}.data-cell-stack{display:flex;flex-direction:column;width:100%;gap:var(--s-space-16)}.data-cell-stack__header{display:flex;align-items:flex-start;gap:var(--s-space-8);width:100%;justify-content:space-between}.data-cell-stack__header-content{display:flex;flex-direction:column;align-items:flex-start;gap:var(--s-space-4)}.data-cell-stack__label{font-size:var(--s-font-size-base);line-height:var(--s-line-height-base);color:var(--s-text-default);font-weight:var(--s-font-weight-semibold);margin:0}.data-cell-stack__description{font-size:var(--s-font-size-sm);line-height:var(--s-line-height-sm);color:var(--s-text-subdued);margin:0}.data-cell-stack__cells{display:flex;flex-direction:column;gap:var(--s-space-2)}.data-cell-stack__cells ::slotted(swirl-data-cell:first-of-type:not(:last-of-type)){--swirl-data-cell-border-radius:var(--s-border-radius-l)     var(--s-border-radius-l) var(--s-border-radius-s) var(--s-border-radius-s)}.data-cell-stack__cells ::slotted(swirl-data-cell:last-of-type:not(:first-of-type)){--swirl-data-cell-border-radius:var(--s-border-radius-s)     var(--s-border-radius-s) var(--s-border-radius-l) var(--s-border-radius-l)}.data-cell-stack__cells ::slotted(swirl-data-cell:not(:first-of-type):not(:last-of-type)){--swirl-data-cell-border-radius:var(--s-border-radius-s)}.data-cell-stack__cells ::slotted(swirl-data-cell:first-of-type:last-of-type){--swirl-data-cell-border-radius:var(--s-border-radius-l)}.data-cell-stack__cta{display:flex;align-items:center;flex-shrink:0}", h = class {
  constructor(a) {
    c(this, a), this.hideLabel = !1, this.headerId = `data-cell-stack-header-${b()}`, this.onSlotChange = (s) => {
      s.target.assignedElements().filter((r) => r.tagName !== "SWIRL-DATA-CELL").length > 0 && console.warn("[SwirlDataCellStack] Only swirl-data-cell elements are allowed as direct children.");
    };
  }
  render() {
    const a = Boolean(this.el.querySelector('[slot="cta"]')), s = Boolean(this.label) && !this.hideLabel, d = n("data-cell-stack", {
      "data-cell-stack--has-cta": a
    }), t = s ? `${this.headerId}-label` : void 0, l = this.description ? `${this.headerId}-description` : void 0;
    return e(i, { key: "b79ce886f01b55239f1a2a0a153568fcdd3d9961" }, e("div", { key: "d95fafcfc4de8958971ecb91f43dd7339e89bab6", class: d, part: "data-cell-stack", role: "group" }, (s || this.description || a) && e("header", { key: "e87a98dab5c55ea579dc414add17d41a7fdd416b", class: "data-cell-stack__header", id: this.headerId }, e("div", { key: "3774cf27961cc6088db2c01fa76becea9d46eb7d", class: "data-cell-stack__header-content" }, s && e("h3", { key: "ee1312f8b92564c3f87d3b0c2a4270e5be15e472", class: "data-cell-stack__label", id: t }, this.label), this.description && e("p", { key: "8c70b4d92f1bd6be313df0d9de091731c1a9aa20", class: "data-cell-stack__description", id: l }, this.description)), a && e("div", { key: "d0dfecd262d77c78efd59def270e6a924275eb33", class: "data-cell-stack__cta" }, e("slot", { key: "ad3505f97e9b89707fd007971b0858eeb907ceee", name: "cta" }))), e("div", { key: "a8bb8acd3e42db09ebb8ba47490e5a7a2be083af", class: "data-cell-stack__cells", role: "list", "aria-labelledby": t || void 0, "aria-describedby": l || void 0 }, e("slot", { key: "8652e5e828e2f8da7ff31837c9d0814a945b66b1", onSlotchange: this.onSlotChange }))));
  }
  get el() {
    return o(this);
  }
};
h.style = f();
export {
  h as swirl_data_cell_stack
};
