import { clsx } from 'clsx';
import { twMerge } from 'tailwind-merge';
import { jsxs, jsx } from 'react/jsx-runtime';

// src/lib/utils.ts
function cn(...inputs) {
  return twMerge(clsx(inputs));
}
function AppDataTable({
  title,
  description,
  toolbar,
  children,
  footer,
  className
}) {
  const hasHeader = Boolean(title || description || toolbar);
  return /* @__PURE__ */ jsxs("section", { className: cn("flex flex-col gap-4", className), children: [
    hasHeader ? /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between", children: [
      title || description ? /* @__PURE__ */ jsxs("div", { children: [
        title ? /* @__PURE__ */ jsx("h2", { className: "text-lg font-semibold text-foreground", children: title }) : null,
        description ? /* @__PURE__ */ jsx("p", { className: "mt-1 text-sm text-muted-foreground", children: description }) : null
      ] }) : null,
      toolbar ? /* @__PURE__ */ jsx("div", { className: "flex items-center gap-2", children: toolbar }) : null
    ] }) : null,
    /* @__PURE__ */ jsx("div", { className: "overflow-hidden rounded-xl border border-border bg-card", children }),
    footer ? /* @__PURE__ */ jsx("div", { className: "flex flex-col items-center justify-between gap-3 sm:flex-row", children: footer }) : null
  ] });
}

export { AppDataTable };
//# sourceMappingURL=app-data-table.js.map
//# sourceMappingURL=app-data-table.js.map