/// import { StateWithHistory } from '@veupathdb/wdk-client/lib/Hooks/StateWithHistory'; import { Analysis, NewAnalysis } from '../types/analysis'; declare type Setter = (value: Analysis[T]) => void; export declare const enum Status { InProgress = "in-progress", Loaded = "loaded", NotFound = "not-found", Error = "error" } export declare type AnalysisState = { status: Status; hasUnsavedChanges: boolean; history: Omit, 'setCurrent'>; setName: Setter<'name'>; setFilters: Setter<'filters'>; setVisualizations: Setter<'visualizations'>; setDerivedVariables: Setter<'derivedVariables'>; setStarredVariables: Setter<'starredVariables'>; setVariableUISettings: Setter<'variableUISettings'>; copyAnalysis: () => Promise; deleteAnalysis: () => Promise; saveAnalysis: () => Promise; }; export interface AnalysisStore { getAnalyses(): Promise; createAnalysis(newAnalysis: NewAnalysis): Promise; getAnalysis(analysisId: string): Promise; updateAnalysis(analysis: Analysis): Promise; deleteAnalysis(analysisId: string): Promise; } export declare const AnalysisListContext: import("react").Context<({ name: string; studyId: string; filters: (({ entityId: string; variableId: string; } & { type: "stringSet"; stringSet: string[]; }) | ({ entityId: string; variableId: string; } & { type: "numberSet"; numberSet: number[]; }) | ({ entityId: string; variableId: string; } & { type: "dateSet"; dateSet: string[]; }) | ({ entityId: string; variableId: string; } & { type: "numberRange"; min: number; max: number; }) | ({ entityId: string; variableId: string; } & { type: "dateRange"; min: string; max: string; }))[]; derivedVariables: unknown[]; starredVariables: string[]; variableUISettings: { [x: string]: { [key: string]: unknown; }; }; visualizations: unknown[]; } & { id: string; created: string; modified: string; })[] | undefined>; export declare function useAnalysisList(): ({ name: string; studyId: string; filters: (({ entityId: string; variableId: string; } & { type: "stringSet"; stringSet: string[]; }) | ({ entityId: string; variableId: string; } & { type: "numberSet"; numberSet: number[]; }) | ({ entityId: string; variableId: string; } & { type: "dateSet"; dateSet: string[]; }) | ({ entityId: string; variableId: string; } & { type: "numberRange"; min: number; max: number; }) | ({ entityId: string; variableId: string; } & { type: "dateRange"; min: string; max: string; }))[]; derivedVariables: unknown[]; starredVariables: string[]; variableUISettings: { [x: string]: { [key: string]: unknown; }; }; visualizations: unknown[]; } & { id: string; created: string; modified: string; })[]; export declare const AnalysisContext: import("react").Context; export declare function useAnalysis(): AnalysisState; export declare function useAnalysisState(analysisId: string, store: AnalysisStore): AnalysisState; export {}; //# sourceMappingURL=useAnalysis.d.ts.map