import Link from "next/link";
import { Button } from "@/components/ui/button";
import { RiAddLine, RiDownloadLine } from "@remixicon/react";

interface InventoryHeaderProps {
  dateRangeLabel: string;
}

export function InventoryHeader({ dateRangeLabel }: InventoryHeaderProps) {
  return (
    <div className="flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between">
      <div className="space-y-1">
        <h1 className="text-2xl font-bold tracking-tight">Inventory</h1>
        <p className="text-sm text-muted-foreground">
          Monitor stock, sales, revenue, and profit.
          {dateRangeLabel && (
            <span className="hidden sm:inline">
              {" "}
              · Showing data for{" "}
              <span className="font-medium text-foreground">{dateRangeLabel}</span>
            </span>
          )}
        </p>
      </div>

      <div className="flex items-center gap-2">
        <Button variant="outline" size="sm">
          <RiDownloadLine className="h-4 w-4 mr-1.5" />
          Export
        </Button>
        <Link href="/admin/dashboard/inventory/add">
          <Button size="sm">
            <RiAddLine className="h-4 w-4 mr-1.5" />
            Add Product
          </Button>
        </Link>
      </div>
    </div>
  );
}
