import { r, h as e, H as i, g as o } from "./index.e6beb8d9.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) {
    r(this, a), this.hideLabel = !1, this.headerId = `data-cell-stack-header-${b()}`, this.onSlotChange = (s) => {
      s.target.assignedElements().filter((c) => c.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: "c5a7f1db47518a1159922596dca273835ad8e273" }, e("div", { key: "5a9155ba4874b1a2aefa9ac66376843ed330c17e", class: d, part: "data-cell-stack", role: "group" }, (s || this.description || a) && e("header", { key: "f96be02e2672c703fc0f036cea4b8a46ca600ae5", class: "data-cell-stack__header", id: this.headerId }, e("div", { key: "69d283e694e896bd4a8d06941400668873cdfdfc", class: "data-cell-stack__header-content" }, s && e("h3", { key: "45aeece6c12e55eb617d9e3d0ca5b704e0aeae4e", class: "data-cell-stack__label", id: t }, this.label), this.description && e("p", { key: "768d7a8fd7b8b47dc3ce97b23e8488c7c6c663bc", class: "data-cell-stack__description", id: l }, this.description)), a && e("div", { key: "fe3829a57d9e5357c58f6fca5d4236a611c0b553", class: "data-cell-stack__cta" }, e("slot", { key: "7a7ff7b1e33321685e3bb552154cfcebbd094463", name: "cta" }))), e("div", { key: "8ba716b5991d67d0edfbd6139f821a3eace709d7", class: "data-cell-stack__cells", role: "list", "aria-labelledby": t || void 0, "aria-describedby": l || void 0 }, e("slot", { key: "f3c3f72c0c551a3bc730e4d83b13cccb0d632bfd", onSlotchange: this.onSlotChange }))));
  }
  get el() {
    return o(this);
  }
};
h.style = f();
export {
  h as swirl_data_cell_stack
};
