"use client";
import { jsx, jsxs } from "react/jsx-runtime";
import { cn } from "@open-mercato/shared/lib/utils";
import { Button } from "@open-mercato/ui/primitives/button";
import { Plus } from "lucide-react";
function EmptyState({
  title,
  description,
  action,
  actionLabel,
  onAction,
  icon,
  className,
  actionLabelClassName,
  children
}) {
  const resolvedAction = action ?? (actionLabel ? { label: actionLabel, onClick: onAction } : void 0);
  return /* @__PURE__ */ jsxs(
    "div",
    {
      className: cn(
        "flex flex-col items-center justify-center rounded-lg border border-dashed border-muted-foreground/40 bg-muted/30 px-6 py-10 text-center",
        className
      ),
      children: [
        icon ? /* @__PURE__ */ jsx("div", { className: "mb-3 text-muted-foreground", children: icon }) : null,
        /* @__PURE__ */ jsx("p", { className: "text-sm font-medium text-foreground", children: title }),
        description ? /* @__PURE__ */ jsx("p", { className: "mt-2 text-sm text-muted-foreground", children: description }) : null,
        children,
        resolvedAction ? /* @__PURE__ */ jsxs(
          Button,
          {
            type: "button",
            variant: "outline",
            size: "sm",
            onClick: resolvedAction.onClick,
            className: cn("mt-4 inline-flex items-center gap-2 text-foreground", actionLabelClassName),
            disabled: resolvedAction.disabled,
            children: [
              resolvedAction.icon ?? /* @__PURE__ */ jsx(Plus, { className: "h-4 w-4", "aria-hidden": true }),
              /* @__PURE__ */ jsx("span", { children: resolvedAction.label })
            ]
          }
        ) : null
      ]
    }
  );
}
export {
  EmptyState
};
//# sourceMappingURL=EmptyState.js.map
