import { j as a } from "../../node_modules/react/jsx-runtime.js";
import { cn as r } from "../../utils/index.js";
import { cva as u } from "../../node_modules/class-variance-authority/dist/index.js";
function g({
  header: e,
  footer: t,
  className: l,
  children: s,
  tableProps: { className: n, ...o } = {},
  borderless: i,
  ...c
}) {
  return /* @__PURE__ */ a.jsxs(
    "section",
    {
      className: r(
        "rounded-lg fill-surface-alt flex flex-col",
        !i && "outline outline-1 outline-divider-medium",
        l
      ),
      ...c,
      children: [
        !!e && e,
        /* @__PURE__ */ a.jsx("table", { className: r("rounded-lg", n), ...o, children: s }),
        !!t && t
      ]
    }
  );
}
function f({ className: e, ...t }) {
  return /* @__PURE__ */ a.jsx(
    "tr",
    {
      className: r(
        "odd:bg-surface-alt even:bg-surface hover:bg-interaction-muted-brand-hover cursor-pointer",
        e
      ),
      ...t
    }
  );
}
const d = u(["bg-transparent"], {
  variants: {
    size: {
      default: "p-4",
      compact: "px-4 py-8"
    },
    align: {
      left: "text-left",
      right: "text-right"
    }
  },
  defaultVariants: {
    size: "default",
    align: "left"
  }
});
function m({
  className: e,
  size: t,
  align: l,
  ...s
}) {
  return /* @__PURE__ */ a.jsx(
    "td",
    {
      className: r(d({ size: t, align: l }), e),
      ...s
    }
  );
}
function j({ className: e, ...t }) {
  return /* @__PURE__ */ a.jsx(
    f,
    {
      className: r("border-b first:!bg-surface-alt", e),
      ...t
    }
  );
}
function N({ className: e, ...t }) {
  return /* @__PURE__ */ a.jsx(m, { className: r("font-medium", e), ...t });
}
function v({ className: e, ...t }) {
  return /* @__PURE__ */ a.jsx(
    "div",
    {
      className: r(
        "px-6 py-4 flex flex-row justify-between items-center border-t",
        e
      ),
      ...t
    }
  );
}
function T({ className: e, ...t }) {
  return /* @__PURE__ */ a.jsx(
    "div",
    {
      className: r("px-6 pt-6 pb-4 flex flex-col gap-4", e),
      ...t
    }
  );
}
export {
  g as Table,
  m as TableCell,
  v as TableFooter,
  T as TableHeader,
  N as TableHeaderCell,
  j as TableHeaderRow,
  f as TableRow
};
