"use client";

import { RiInboxLine } from "@remixicon/react";
import { Button } from "@/components/ui/button";
import {
  Empty,
  EmptyContent,
  EmptyDescription,
  EmptyHeader,
  EmptyMedia,
  EmptyTitle,
} from "@/components/ui/empty";

interface OrdersEmptyStateProps {
  hasActiveFilters: boolean;
  onReset: () => void;
}

/**
 * Shown when no orders match the current search/filters.
 */
export function OrdersEmptyState({
  hasActiveFilters,
  onReset,
}: OrdersEmptyStateProps) {
  return (
    <Empty>
      <EmptyHeader>
        <EmptyMedia variant="icon">
          <RiInboxLine className="size-6" />
        </EmptyMedia>
        <EmptyTitle>No orders found</EmptyTitle>
        <EmptyDescription>
          {hasActiveFilters
            ? "No orders match your current search or filters. Try adjusting them."
            : "There are no orders in this store yet. New orders will appear here."}
        </EmptyDescription>
      </EmptyHeader>
      <EmptyContent>
        {hasActiveFilters && (
          <Button variant="outline" size="sm" onClick={onReset}>
            Reset filters
          </Button>
        )}
      </EmptyContent>
    </Empty>
  );
}