"use client";
import { cva } from 'class-variance-authority';
import * as React from 'react';
import { clsx } from 'clsx';
import { twMerge } from 'tailwind-merge';
import { jsxs, jsx } from 'react/jsx-runtime';

// src/primitives/empty/empty.tsx
function cn(...inputs) {
  return twMerge(clsx(inputs));
}
var emptyVariants = cva(
  [
    "flex flex-col items-center justify-center text-center",
    "rounded-md border border-dashed border-border bg-muted/30"
  ].join(" "),
  {
    variants: {
      size: {
        sm: "gap-[var(--space-2,0.5rem)] px-[var(--space-4,1rem)] py-[var(--space-6,1.5rem)] text-sm",
        default: "gap-[var(--space-3,0.75rem)] px-[var(--space-6,1.5rem)] py-[var(--space-8,2rem)]",
        lg: "gap-[var(--space-4,1rem)] px-[var(--space-8,2rem)] py-[var(--space-12,3rem)]"
      }
    },
    defaultVariants: { size: "default" }
  }
);
var emptyIconWrapperVariants = cva(
  "flex shrink-0 items-center justify-center rounded-full bg-muted text-muted-foreground [&_svg]:size-5",
  {
    variants: {
      size: {
        sm: "h-9 w-9",
        default: "h-12 w-12 [&_svg]:size-6",
        lg: "h-16 w-16 [&_svg]:size-7"
      }
    },
    defaultVariants: { size: "default" }
  }
);
var emptyTitleVariants = cva("font-semibold text-foreground", {
  variants: {
    size: {
      sm: "text-sm",
      default: "text-base",
      lg: "text-lg"
    }
  },
  defaultVariants: { size: "default" }
});
var emptyDescriptionVariants = cva("max-w-md text-muted-foreground", {
  variants: {
    size: {
      sm: "text-xs",
      default: "text-sm",
      lg: "text-base"
    }
  },
  defaultVariants: { size: "default" }
});
function Empty({
  className,
  size,
  icon,
  title,
  description,
  action,
  titleAs = "h3",
  ref,
  ...props
}) {
  const titleId = React.useId();
  const TitleComp = titleAs;
  return /* @__PURE__ */ jsxs(
    "div",
    {
      ref,
      role: "region",
      "aria-labelledby": titleId,
      className: cn(emptyVariants({ size }), className),
      ...props,
      children: [
        icon ? /* @__PURE__ */ jsx("div", { className: emptyIconWrapperVariants({ size }), "aria-hidden": "true", children: icon }) : null,
        /* @__PURE__ */ jsx(TitleComp, { id: titleId, className: emptyTitleVariants({ size }), children: title }),
        description ? /* @__PURE__ */ jsx("div", { className: emptyDescriptionVariants({ size }), children: description }) : null,
        action ? /* @__PURE__ */ jsx("div", { className: "mt-[var(--space-2,0.5rem)]", children: action }) : null
      ]
    }
  );
}

export { Empty, emptyVariants };
//# sourceMappingURL=empty.js.map
//# sourceMappingURL=empty.js.map