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