import { r as i, h as s, H as r, g as l } from "./index.61732cef.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(e) {
    i(this, e), this.variant = "default", this.minWidth = "fit-content";
  }
  componentDidRender() {
    const e = d(this.el, "swirl-table");
    e == null || e.rerender();
  }
  render() {
    var a;
    const e = {
      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 s(r, { key: "df43863a76d644f48fa6e00bd11e0baa316f2fe8", "aria-sort": this.sort, class: o, role: "columnheader", style: e }, s("span", { key: "5e77028dea940f0ee660063b744539f9e3454ff7" }, s("slot", { key: "630c2f4c040dbf4cabaf41f4e2460b95ce966f1c" })), this.sortable && s("span", { key: "fb7e79358cc7c457a5cfdb611e7081dbddafca92", class: "table-column__sort-indicator" }, this.sort === "ascending" && s("swirl-icon-arrow-upward", { key: "7ed07813924118ffb585a1df99dfbc2b8c7f9067", "aria-hidden": "true", size: 20 }), this.sort === "descending" && s("swirl-icon-arrow-downward", { key: "64eef8c775084dbbf0421960327f4bf0a7246bba", "aria-hidden": "true", size: 20 }), !Boolean(this.sort) && " "));
  }
  get el() {
    return l(this);
  }
};
h.style = c();
export {
  h as swirl_table_column
};
