"use client"; import { IconRefresh } from "@tabler/icons-react"; import { Button } from "@kandev/ui/button"; import { Input } from "@kandev/ui/input"; import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@kandev/ui/select"; import { cn } from "@/lib/utils"; import { formatRelativeTime } from "@/lib/utils"; const ALL_REPOS = "__all__"; type ListToolbarProps = { title: string; count: number; loading: boolean; lastFetchedAt: Date | null; customQuery: string; committedQuery: string; onCustomQueryChange: (value: string) => void; onCommitCustomQuery: () => void; repoFilter: string; onRepoFilterChange: (value: string) => void; repoOptions: string[]; onRefresh: () => void; }; export function ListToolbar({ title, count, loading, lastFetchedAt, customQuery, committedQuery, onCustomQueryChange, onCommitCustomQuery, repoFilter, onRepoFilterChange, repoOptions, onRefresh, }: ListToolbarProps) { const selectValue = repoFilter || ALL_REPOS; const dirty = customQuery !== committedQuery; return (