// FIX: Removed self-import of 'Modality' that was conflicting with its own declaration. export type Modality = 'image' | 'text' | 'mesh'; export type ProcessingState = 'unprocessed' | 'processing' | 'processed' | 'error'; export interface DataItem { id: string; name: string; // Content can be null for shared datasets that need to be lazy-loaded. content: string | ArrayBuffer | null; // URL to fetch the content if it's not available locally. contentUrl?: string; } // Represents the full dataset object, including all heavy data. // This will be stored in IndexedDB and loaded only when needed. export interface Dataset { id: string; // UUID name: string; uploadDate: Date; data: { images: DataItem[]; texts: DataItem[]; meshes: DataItem[]; }; processingState: ProcessingState; processingProgress?: number; fullComparison?: FullComparisonResult; isShared?: boolean; // Flag to indicate if the dataset is hosted on the server. } // Represents a lightweight version of the Dataset for quick loading and display. // This is what will be held in the main application state. export interface DatasetMetadata { id: string; name: string; uploadDate: Date; processingState: ProcessingState; itemCounts: { images: number; texts: number; meshes: number; } isShared?: boolean; // Flag to indicate if the dataset is hosted on the server. } export interface MatchResult { item: DataItem; confidence: number; } export interface SingleComparisonResult { sourceItem: DataItem; sourceModality: Modality; results: { images?: MatchResult[]; texts?: MatchResult[]; meshes?: MatchResult[]; }; } export interface FullComparisonSourceItem { source: string; // filename matches: { [key in Modality]?: { item: string; confidence: number }[]; }; } export interface FullComparisonResult { images: FullComparisonSourceItem[]; texts: FullComparisonSourceItem[]; meshes: FullComparisonSourceItem[]; }