import { jsx as _jsx } from "react/jsx-runtime";
import clsx from "clsx";
const defaultTableCass = `
divide-y divide-border
[&>tbody]:divide-y [&>tbody]:divide-border
[&_th]:text-left [&_th]:px-3 [&_th]:py-3.5 [&_th]:text-sm [&_th]:font-normal [&_th]:text-muted-foreground
[&_td]:px-3 [&_td]:py-4 [&_td]:text-sm
`;
export function Table({ className, children, ...others }) {
    return (_jsx("table", { className: clsx(defaultTableCass, className), ...others, children: children }));
}
export function RowSkeleton({ columns }) {
    return (_jsx("tr", { className: "hover:bg-muted", children: Array(columns).fill(0).map((_, index) => _jsx("td", { children: _jsx("div", { className: "animate-pulse rounded-xs h-5 bg-muted" }) }, index)) }));
}
export function TBody({ isLoading = false, columns, rows = 3, children }) {
    return (_jsx("tbody", { children: isLoading ?
            Array(rows).fill(0).map((_, index) => _jsx(RowSkeleton, { columns: columns }, index))
            : children }));
}
export function TR({ className, children, ...others }) {
    return (_jsx("tr", { className: clsx("hover:bg-muted hover:cursor-pointer", className), ...others, children: children }));
}
//# sourceMappingURL=index.js.map