import { K as jsxRuntimeExports } from "./server-ChzsfjB9.js";
import { C as Card, g as CardHeader, h as CardTitle, f as CardContent } from "./card-HyNxoILF.js";
import { B as Button, a as cn } from "./input-muzHTpl5.js";
import { F as FileText, S as Sheet } from "./sheet-CpXgBl29.js";
function ChartCard({
  title,
  subtitle,
  icon,
  onExportPDF,
  onExportExcel,
  className,
  contentClassName,
  children
}) {
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(Card, { className: cn("border-border/60 shadow-sm hover:shadow-md transition-shadow", className), children: [
    /* @__PURE__ */ jsxRuntimeExports.jsxs(CardHeader, { className: "flex flex-row items-start justify-between gap-3 space-y-0 pb-2", children: [
      /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "min-w-0", children: [
        /* @__PURE__ */ jsxRuntimeExports.jsxs(CardTitle, { className: "text-base flex items-center gap-2", children: [
          icon,
          /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "truncate", children: title })
        ] }),
        subtitle && /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-xs text-muted-foreground mt-0.5", children: subtitle })
      ] }),
      /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex shrink-0 items-center gap-1.5", children: [
        onExportPDF && /* @__PURE__ */ jsxRuntimeExports.jsxs(
          Button,
          {
            type: "button",
            size: "sm",
            variant: "outline",
            title: "Exportar PDF",
            onClick: onExportPDF,
            className: "h-7 gap-1 px-2 text-[11px] border-destructive/30 text-destructive hover:bg-destructive/10 hover:text-destructive",
            children: [
              /* @__PURE__ */ jsxRuntimeExports.jsx(FileText, { className: "h-3.5 w-3.5" }),
              "PDF"
            ]
          }
        ),
        onExportExcel && /* @__PURE__ */ jsxRuntimeExports.jsxs(
          Button,
          {
            type: "button",
            size: "sm",
            variant: "outline",
            title: "Exportar Excel",
            onClick: onExportExcel,
            className: "h-7 gap-1 px-2 text-[11px] border-success/30 text-success hover:bg-success/10 hover:text-success",
            children: [
              /* @__PURE__ */ jsxRuntimeExports.jsx(Sheet, { className: "h-3.5 w-3.5" }),
              "Excel"
            ]
          }
        )
      ] })
    ] }),
    /* @__PURE__ */ jsxRuntimeExports.jsx(CardContent, { className: cn(contentClassName), children })
  ] });
}
export {
  ChartCard as C
};
