import { Ref, ComputedRef } from 'vue'; import { ExperimentSummary, ExperimentFilters, ExperimentTypeOption, SelectOption } from '../types'; export interface UseExperimentSelectorOptions { experimentType?: string; allowedExperimentTypes?: string[] | null; apiBaseUrl?: string; limit?: number; immediate?: boolean; } export interface UseExperimentSelectorReturn { /** Current page of fetched experiment rows. */ experiments: Ref; /** Total matching experiment count reported by the platform. */ total: Ref; /** Currently selected experiment, or null. */ selectedExperiment: Ref; /** Mutable filters used for the next fetch. */ filters: ExperimentFilters; /** Whether experiment rows are currently loading. */ isLoading: Ref; /** Error message from the last failed fetch, or null. */ error: Ref; /** Timestamp of the last successful experiment fetch, or null. */ lastLoadedAt: Ref; /** Current zero-based page index. */ page: Ref; /** Whether another page can be loaded. */ hasMore: ComputedRef; /** Combined sort key in the form `:`. */ sortKey: Ref; /** Available experiment type options for filter UI. */ experimentTypes: Ref; /** Available project options for filter UI. */ projects: Ref[]>; /** Fetched experiments grouped by project name. */ groupedByProject: ComputedRef<[string, ExperimentSummary[]][]>; /** Fetch the current page with the current filters. */ fetch: () => Promise; /** Fetch and append the next page when available. */ loadMore: () => Promise; /** Clear fetched rows and refetch page zero. */ reset: () => void; /** Select an experiment. */ select: (experiment: ExperimentSummary) => void; /** Clear selection and filters. */ clear: () => void; /** Fetch experiment type and project filter options. */ fetchFilterOptions: () => Promise; } /** Fetches a paginated, filtered experiment list from the platform API for picker and selector UIs. */ export declare function useExperimentSelector(options?: UseExperimentSelectorOptions): UseExperimentSelectorReturn;