import { PrismaService } from "../../../core/database/prisma/prisma.service";
import { Prisma } from '@prisma/client';
import { GradeConfigService } from './grade-config.service';
import { NotificationService } from "../../../core/messaging/notification/notification.service";
import { SaveOverallCommentDto } from '../dto/result.dto';
export declare class ResultService {
    private readonly prisma;
    private readonly gradeConfigService;
    private readonly notificationService;
    constructor(prisma: PrismaService, gradeConfigService: GradeConfigService, notificationService: NotificationService);
    calculateResults(cycleId: string, options: {
        weights: {
            kpi: number;
            e360: number;
        };
        employeeIds?: string[];
    }): Promise<{
        cycleId: string;
        calculated: number;
        failed: number;
        failedEmployees: {
            employeeId: string;
            reason: string;
        }[];
    }>;
    recalculateGrades(cycleId: string): Promise<{
        cycleId: string;
        updated: number;
    }>;
    publishResults(cycleId: string, publishedBy: string, options?: {
        employeeIds?: string[];
        notifyEmployees?: boolean;
    }): Promise<{
        cycleId: string;
        published: number;
        alreadyPublished: number;
        notified: number;
    }>;
    findMyResults(userId: string, query?: {
        page?: number;
        pageSize?: number;
    }): Promise<{
        items: {
            id: string;
            cycleId: string;
            cycleName: string;
            cycleType: import("@prisma/client").$Enums.CycleType;
            totalScore: number;
            proposedGradeCode: string | null;
            proposedGradeName: string | null;
            gradeCode: string | null;
            gradeName: string | null;
            gradeColor: string;
            isPublished: boolean;
            publishedAt: Date | null;
            viewedByEmployee: boolean;
            viewedAt: Date | null;
            confirmStatus: import("@prisma/client").$Enums.ResultConfirmStatus;
            appealReason: string | null;
        }[];
        pagination: {
            page: number;
            pageSize: number;
            total: number;
            totalPages: number;
        };
    }>;
    findMyResultByCycle(userId: string, cycleId: string): Promise<{
        id: string;
        cycleId: string;
        cycleName: string;
        employeeId: string;
        employeeName: string;
        kpiScore: number | null;
        kpiWeight: number | null;
        e360Score: number | null;
        e360Weight: number | null;
        totalScore: number;
        proposedGradeCode: string | null;
        proposedGradeName: string | null;
        gradeCode: string | null;
        gradeName: string | null;
        gradeColor: string;
        scoreBreakdown: {
            kpiDetails: {
                indicatorName: string;
                score: number;
                weight: number;
            }[];
        };
        isPublished: true;
        publishedAt: Date | null;
        viewedByEmployee: boolean;
        viewedAt: Date | null;
        remarks: string | null;
        createdAt: Date;
        updatedAt: Date;
    }>;
    findByCycle(cycleId: string, query?: {
        departmentId?: string;
        gradeCode?: string;
        isPublished?: boolean;
        page?: number;
        pageSize?: number;
    }): Promise<{
        items: {
            id: string;
            employeeId: string;
            employeeName: string;
            departmentName: string;
            totalScore: number;
            proposedGradeCode: string | null;
            proposedGradeName: string | null;
            gradeCode: string | null;
            gradeName: string | null;
            isPublished: boolean;
            viewedByEmployee: boolean;
            confirmStatus: import("@prisma/client").$Enums.ResultConfirmStatus;
            appealReason: string | null;
        }[];
        pagination: {
            page: number;
            pageSize: number;
            total: number;
            totalPages: number;
        };
        summary: {
            totalEmployees: number;
            publishedCount: number;
            viewedCount: number;
            confirmedCount: number;
            appealedCount: number;
        };
    }>;
    findById(id: string): Promise<{
        id: string;
        cycleId: string;
        employeeId: string;
        kpiScore: number | null;
        kpiWeight: number | null;
        e360Score: number | null;
        e360Weight: number | null;
        totalScore: number;
        proposedGradeCode: string | null;
        proposedGradeName: string | null;
        gradeCode: string | null;
        gradeName: string | null;
        isPublished: boolean;
        publishedAt: Date | null;
        viewedByEmployee: boolean;
        viewedAt: Date | null;
        remarks: string | null;
        createdAt: Date;
        updatedAt: Date;
        deletedAt: Date | null;
    }>;
    getStatistics(cycleId: string): Promise<{
        cycleId: string;
        totalEmployees: number;
        averageScore: number;
        gradeDistribution: {
            percentage: number;
            code: string;
            name: string;
            count: number;
        }[];
        publishedCount: number;
        viewedCount: number;
    }>;
    markAsViewed(id: string, currentUserId: string): Promise<{
        id: string;
        employeeId: string;
        createdAt: Date;
        updatedAt: Date;
        deletedAt: Date | null;
        organizationId: string;
        publishedAt: Date | null;
        viewedAt: Date | null;
        cycleId: string;
        isPublished: boolean;
        kpiScore: Prisma.Decimal | null;
        kpiWeight: Prisma.Decimal | null;
        e360Score: Prisma.Decimal | null;
        e360Weight: Prisma.Decimal | null;
        totalScore: Prisma.Decimal | null;
        proposedGradeCode: string | null;
        proposedGradeName: string | null;
        gradeCode: string | null;
        gradeName: string | null;
        viewedByEmployee: boolean;
        confirmStatus: import("@prisma/client").$Enums.ResultConfirmStatus;
        appealReason: string | null;
        appealResponse: string | null;
        appealResolvedAt: Date | null;
        selfOverallComment: string | null;
        managerOverallComment: string | null;
        remarks: string | null;
    } | {
        id: string;
        cycleId: string;
        employeeId: string;
        kpiScore: number | null;
        kpiWeight: number | null;
        e360Score: number | null;
        e360Weight: number | null;
        totalScore: number;
        proposedGradeCode: string | null;
        proposedGradeName: string | null;
        gradeCode: string | null;
        gradeName: string | null;
        isPublished: boolean;
        publishedAt: Date | null;
        viewedByEmployee: boolean;
        viewedAt: Date | null;
        remarks: string | null;
        createdAt: Date;
        updatedAt: Date;
        deletedAt: Date | null;
    }>;
    assignGrade(resultId: string, gradeCode: string, gradeName: string): Promise<{
        id: string;
        employeeId: string;
        createdAt: Date;
        updatedAt: Date;
        deletedAt: Date | null;
        organizationId: string;
        publishedAt: Date | null;
        viewedAt: Date | null;
        cycleId: string;
        isPublished: boolean;
        kpiScore: Prisma.Decimal | null;
        kpiWeight: Prisma.Decimal | null;
        e360Score: Prisma.Decimal | null;
        e360Weight: Prisma.Decimal | null;
        totalScore: Prisma.Decimal | null;
        proposedGradeCode: string | null;
        proposedGradeName: string | null;
        gradeCode: string | null;
        gradeName: string | null;
        viewedByEmployee: boolean;
        confirmStatus: import("@prisma/client").$Enums.ResultConfirmStatus;
        appealReason: string | null;
        appealResponse: string | null;
        appealResolvedAt: Date | null;
        selfOverallComment: string | null;
        managerOverallComment: string | null;
        remarks: string | null;
    }>;
    addRemarks(resultId: string, remarks: string): Promise<{
        id: string;
        employeeId: string;
        createdAt: Date;
        updatedAt: Date;
        deletedAt: Date | null;
        organizationId: string;
        publishedAt: Date | null;
        viewedAt: Date | null;
        cycleId: string;
        isPublished: boolean;
        kpiScore: Prisma.Decimal | null;
        kpiWeight: Prisma.Decimal | null;
        e360Score: Prisma.Decimal | null;
        e360Weight: Prisma.Decimal | null;
        totalScore: Prisma.Decimal | null;
        proposedGradeCode: string | null;
        proposedGradeName: string | null;
        gradeCode: string | null;
        gradeName: string | null;
        viewedByEmployee: boolean;
        confirmStatus: import("@prisma/client").$Enums.ResultConfirmStatus;
        appealReason: string | null;
        appealResponse: string | null;
        appealResolvedAt: Date | null;
        selfOverallComment: string | null;
        managerOverallComment: string | null;
        remarks: string | null;
    }>;
    exportResults(payload: {
        cycleId: string;
        format: 'xlsx' | 'csv';
        fields?: string[];
    }): Promise<{
        downloadUrl: string;
        expiresAt: string;
    }>;
    confirmResult(resultId: string, userId: string): Promise<{
        id: string;
        employeeId: string;
        createdAt: Date;
        updatedAt: Date;
        deletedAt: Date | null;
        organizationId: string;
        publishedAt: Date | null;
        viewedAt: Date | null;
        cycleId: string;
        isPublished: boolean;
        kpiScore: Prisma.Decimal | null;
        kpiWeight: Prisma.Decimal | null;
        e360Score: Prisma.Decimal | null;
        e360Weight: Prisma.Decimal | null;
        totalScore: Prisma.Decimal | null;
        proposedGradeCode: string | null;
        proposedGradeName: string | null;
        gradeCode: string | null;
        gradeName: string | null;
        viewedByEmployee: boolean;
        confirmStatus: import("@prisma/client").$Enums.ResultConfirmStatus;
        appealReason: string | null;
        appealResponse: string | null;
        appealResolvedAt: Date | null;
        selfOverallComment: string | null;
        managerOverallComment: string | null;
        remarks: string | null;
    }>;
    appealResult(resultId: string, userId: string, reason: string): Promise<{
        id: string;
        employeeId: string;
        createdAt: Date;
        updatedAt: Date;
        deletedAt: Date | null;
        organizationId: string;
        publishedAt: Date | null;
        viewedAt: Date | null;
        cycleId: string;
        isPublished: boolean;
        kpiScore: Prisma.Decimal | null;
        kpiWeight: Prisma.Decimal | null;
        e360Score: Prisma.Decimal | null;
        e360Weight: Prisma.Decimal | null;
        totalScore: Prisma.Decimal | null;
        proposedGradeCode: string | null;
        proposedGradeName: string | null;
        gradeCode: string | null;
        gradeName: string | null;
        viewedByEmployee: boolean;
        confirmStatus: import("@prisma/client").$Enums.ResultConfirmStatus;
        appealReason: string | null;
        appealResponse: string | null;
        appealResolvedAt: Date | null;
        selfOverallComment: string | null;
        managerOverallComment: string | null;
        remarks: string | null;
    }>;
    resolveAppeal(resultId: string, data: {
        response: string;
        action: 'MAINTAIN' | 'ADJUST';
        adjustedGrade?: string;
        adjustedScore?: number;
    }): Promise<{
        id: string;
        employeeId: string;
        createdAt: Date;
        updatedAt: Date;
        deletedAt: Date | null;
        organizationId: string;
        publishedAt: Date | null;
        viewedAt: Date | null;
        cycleId: string;
        isPublished: boolean;
        kpiScore: Prisma.Decimal | null;
        kpiWeight: Prisma.Decimal | null;
        e360Score: Prisma.Decimal | null;
        e360Weight: Prisma.Decimal | null;
        totalScore: Prisma.Decimal | null;
        proposedGradeCode: string | null;
        proposedGradeName: string | null;
        gradeCode: string | null;
        gradeName: string | null;
        viewedByEmployee: boolean;
        confirmStatus: import("@prisma/client").$Enums.ResultConfirmStatus;
        appealReason: string | null;
        appealResponse: string | null;
        appealResolvedAt: Date | null;
        selfOverallComment: string | null;
        managerOverallComment: string | null;
        remarks: string | null;
    }>;
    saveOverallComment(dto: SaveOverallCommentDto, currentUserId: string): Promise<{
        id: string;
        employeeId: string;
        createdAt: Date;
        updatedAt: Date;
        deletedAt: Date | null;
        organizationId: string;
        publishedAt: Date | null;
        viewedAt: Date | null;
        cycleId: string;
        isPublished: boolean;
        kpiScore: Prisma.Decimal | null;
        kpiWeight: Prisma.Decimal | null;
        e360Score: Prisma.Decimal | null;
        e360Weight: Prisma.Decimal | null;
        totalScore: Prisma.Decimal | null;
        proposedGradeCode: string | null;
        proposedGradeName: string | null;
        gradeCode: string | null;
        gradeName: string | null;
        viewedByEmployee: boolean;
        confirmStatus: import("@prisma/client").$Enums.ResultConfirmStatus;
        appealReason: string | null;
        appealResponse: string | null;
        appealResolvedAt: Date | null;
        selfOverallComment: string | null;
        managerOverallComment: string | null;
        remarks: string | null;
    }>;
    getOverallComment(cycleId: string, employeeId: string, currentUserId: string): Promise<{
        selfOverallComment: string | null;
        managerOverallComment: string | null;
    }>;
    private calculateTotalScore;
}
