"use client"; import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@kandev/ui/select"; import { useTranslation } from "react-i18next"; import { IntegrationListToolbar } from "@/components/integrations/integration-list-toolbar"; const ALL_PROJECTS = "__all__"; type ListToolbarProps = { title: string; count: number; loading: boolean; lastFetchedAt: Date | null; customQuery: string; committedQuery: string; onCustomQueryChange: (value: string) => void; onCommitCustomQuery: () => void; projectFilter: string; onProjectFilterChange: (value: string) => void; projectOptions: string[]; onRefresh: () => void; }; export function ListToolbar({ title, count, loading, lastFetchedAt, customQuery, committedQuery, onCustomQueryChange, onCommitCustomQuery, projectFilter, onProjectFilterChange, projectOptions, onRefresh, }: ListToolbarProps) { const { t } = useTranslation(); const selectValue = projectFilter || ALL_PROJECTS; return ( onProjectFilterChange(value === ALL_PROJECTS ? "" : value)} > {t("gitlab:allProjects")} {projectOptions.map((key) => ( {key} ))} } queryPlaceholder={t("gitlab:customQueryPressEnterEG")} titleTestId="gitlab-list-toolbar-title" queryTestId="gitlab-list-toolbar-custom-query" refreshTestId="gitlab-list-toolbar-refresh" /> ); }