"use client";

import { useRouter } from "next/navigation";

export function DashboardFilters({ currentStatus }: { currentStatus?: string }) {
  const router = useRouter();
  return (
    <select
      value={currentStatus ?? ""}
      onChange={(e) =>
        router.push(
          e.target.value
            ? `?status=${e.target.value}`
            : "/portal/dashboard"
        )
      }
      className="border border-gray-200 rounded-lg px-3 py-1.5 text-sm"
    >
      <option value="">All statuses</option>
      <option value="Draft">Draft</option>
      <option value="Sent">Sent</option>
      <option value="Viewed">Viewed</option>
      <option value="Signed">Signed</option>
    </select>
  );
}
