import api from './api';

export interface AnalysisResult {
    pieceDescription: string;
    schemeName: string;
    schemeType?: string;
    realYield: number;
    theoreticalYield: number;
    yieldVariance: number;
    yieldStatus: 'approved' | 'warning' | 'critical';
    diluentUsed: number;
    volumeUsed: number;
    realDilution: number;
    targetDilution: number;
    dilutionStatus: 'approved' | 'warning' | 'critical';
    realDFT: number;
    minDFT: number;
    maxDFT: number;
    dftStatus: 'approved' | 'warning' | 'critical';
    notes: string[];
}

export const getProjectAnalysis = async (projectId: string) => {
    return api.get<AnalysisResult[]>(`/projects/${projectId}/analysis`);
};
