import { r as i, h as e, H as r, g as l } from "./index.e6beb8d9.js";
import { c as n } from "./index-orsBiyT_.fc4357c3.js";
import { l as d } from "./utils-CCck-DTo.e4e43b6a.js";
import "react";
import "react-dom";
const c = () => ":host{display:flex;overflow:hidden;padding-top:var(--s-space-12);padding-right:var(--s-space-16);padding-bottom:var(--s-space-12);padding-left:var(--s-space-16);flex-basis:0;flex-grow:1;flex-shrink:1;align-items:center;border-bottom:var(--s-border-width-default) solid var(--s-border-default);color:var(--s-text-subdued);font-size:var(--s-font-size-sm);font-weight:var(--s-font-weight-medium);line-height:var(--s-line-height-sm);white-space:nowrap;letter-spacing:var(--s-letter-spacing-tighter);text-overflow:ellipsis;transition:box-shadow 0.15s;gap:var(--s-space-8)}:host(.table-column--is-sticky){position:sticky;z-index:1}:host(.table-column--is-sticky-right){position:sticky;z-index:1;right:0}:host(.table-column--has-shadow-right){box-shadow:var(--swirl-table-sticky-right-shadow)}:host(.table-column--has-shadow-left){box-shadow:var(--swirl-table-sticky-left-shadow)}:host(.table-column--default){background-color:var(--s-surface-default)}:host(.table-column--sunken){background-color:var(--s-surface-sunken-default)}:host(.table-column--raised){background-color:var(--s-surface-neutral-subdued)}:host *{box-sizing:border-box}.table-column__sort-indicator{display:inline-flex;width:1.25rem;height:1.25rem;flex-grow:0;flex-shrink:0}", h = class {
  constructor(s) {
    i(this, s), this.variant = "default", this.minWidth = "fit-content";
  }
  componentDidRender() {
    const s = d(this.el, "swirl-table");
    s == null || s.rerender();
  }
  render() {
    var a;
    const s = {
      flex: Boolean(this.width) ? `0 0 ${this.width}` : "",
      maxWidth: this.maxWidth || "",
      minWidth: this.minWidth || ""
    }, t = (a = this.variant) != null ? a : "default", o = n("table-column", {
      "table-column--default": t === "default",
      "table-column--sunken": t === "sunken",
      "table-column--raised": t === "raised"
    });
    return e(r, { key: "1d49180d7045ebea68edc1a7e2c6606c0e6876a7", "aria-sort": this.sort, class: o, role: "columnheader", style: s }, e("span", { key: "19454dcbe0a1e7018fd0c0dd7d1abe1dd411764f" }, e("slot", { key: "a71ff653f24c948bb87ff13436db7c02c9054f28" })), this.sortable && e("span", { key: "cd463d4a168ae9745f5c5f638bc480e47c189d57", class: "table-column__sort-indicator" }, this.sort === "ascending" && e("swirl-icon-arrow-upward", { key: "42576b5cef0657669789c2e4078ec0274673f35f", "aria-hidden": "true", size: 20 }), this.sort === "descending" && e("swirl-icon-arrow-downward", { key: "15dcd329b5a9570121a374f96309a5c83d6d9b57", "aria-hidden": "true", size: 20 }), !Boolean(this.sort) && " "));
  }
  get el() {
    return l(this);
  }
};
h.style = c();
export {
  h as swirl_table_column
};
