import { HttpStatus } from '@nestjs/common';
import { PermissionUserContext } from '../../common/access-control/permission-context.types';
import { PermissionResolverService } from '../../common/access-control/permission-resolver.service';
import { OrgTimezoneService } from '../../common/timezone/org-timezone.service';
import { DatabaseService, UploadService } from '../../config';
import { AttendanceStatusEnum } from '../../config/database/entities';
import { NotificationsService } from '../notifications/notifications.service';
import { bulkUpdateLeaveStatusDto, createLeaveDto, leaveFilterDto, updateLeaveDto, updateLeaveStatusDto } from './leaves.dto';
export declare class LeavesService {
    private readonly db;
    private readonly notificationService;
    private readonly permissionResolver;
    private readonly orgTimezone;
    private readonly uploadService;
    constructor(db: DatabaseService, notificationService: NotificationsService, permissionResolver: PermissionResolverService, orgTimezone: OrgTimezoneService, uploadService: UploadService);
    private getPermissions;
    private includeMember;
    private moveLeaveDocument;
    private ensureMemberExists;
    private ensureNoOverlap;
    private normalizeDayOffLeaveDates;
    private validateDayOffLeave;
    private isDayOffLeave;
    private syncDayOffLeaveAttendance;
    private applyLeaveAttendanceUpdate;
    createLeave(data: createLeaveDto, owner_id: string, ctx: PermissionUserContext): Promise<{
        data: {
            id?: string;
            member_id?: string;
            member?: {
                id: string;
                employee_id: string;
                first_name: string;
                last_name?: string;
                nickname?: string;
                image?: {
                    file_name: string;
                    original_name: string;
                    file_size: number;
                    mime_type: string;
                };
                role?: "owner" | "admin" | "member";
                department?: {
                    id: string;
                    name: string;
                };
            };
            start_date?: string;
            end_date?: string;
            reason?: string;
            document?: {
                file_name: string;
                original_name: string;
                file_size: number;
                mime_type: string;
            };
            status?: "pending" | "approved" | "rejected" | "cancelled";
            leave_type?: string;
            approver_type?: "owner" | "member";
            approver_owner_id?: string;
            approver_member_id?: string;
            approver_owner?: {
                id: string;
                name: string;
                email: string;
                image?: {
                    file_name: string;
                    original_name: string;
                    file_size: number;
                    mime_type: string;
                };
            };
            approver_member?: {
                id: string;
                employee_id: string;
                first_name: string;
                last_name?: string;
                nickname?: string;
                image?: {
                    file_name: string;
                    original_name: string;
                    file_size: number;
                    mime_type: string;
                };
                role?: "owner" | "admin" | "member";
                department?: {
                    id: string;
                    name: string;
                };
            };
            approved_at?: string;
            created_at?: string;
            updated_at?: string;
        };
        message: string;
        status: HttpStatus;
        details: any;
    }>;
    getLeaves(query: leaveFilterDto, owner_id: string, ctx: PermissionUserContext): Promise<{
        data: {
            id?: string;
            member_id?: string;
            member?: {
                id: string;
                employee_id: string;
                first_name: string;
                last_name?: string;
                nickname?: string;
                image?: {
                    file_name: string;
                    original_name: string;
                    file_size: number;
                    mime_type: string;
                };
                role?: "owner" | "admin" | "member";
                department?: {
                    id: string;
                    name: string;
                };
            };
            start_date?: string;
            end_date?: string;
            reason?: string;
            document?: {
                file_name: string;
                original_name: string;
                file_size: number;
                mime_type: string;
            };
            status?: "pending" | "approved" | "rejected" | "cancelled";
            leave_type?: string;
            approver_type?: "owner" | "member";
            approver_owner_id?: string;
            approver_member_id?: string;
            approver_owner?: {
                id: string;
                name: string;
                email: string;
                image?: {
                    file_name: string;
                    original_name: string;
                    file_size: number;
                    mime_type: string;
                };
            };
            approver_member?: {
                id: string;
                employee_id: string;
                first_name: string;
                last_name?: string;
                nickname?: string;
                image?: {
                    file_name: string;
                    original_name: string;
                    file_size: number;
                    mime_type: string;
                };
                role?: "owner" | "admin" | "member";
                department?: {
                    id: string;
                    name: string;
                };
            };
            approved_at?: string;
            created_at?: string;
            updated_at?: string;
        }[];
        message: string;
        status: HttpStatus;
        details: {
            pagination: {
                total_items: any;
                total_pages: number;
                current_page: number;
                items_per_page: number;
                has_next_page: boolean;
                has_previous_page: boolean;
                next_page: number;
                previous_page: number;
            };
            summary: {
                total_requests: any;
                total_approved: number;
                total_pending: number;
                total_rejected: number;
            };
        };
    }>;
    getLeaveById(id: string, owner_id: string, ctx: PermissionUserContext): Promise<{
        data: {
            id?: string;
            member_id?: string;
            member?: {
                id: string;
                employee_id: string;
                first_name: string;
                last_name?: string;
                nickname?: string;
                image?: {
                    file_name: string;
                    original_name: string;
                    file_size: number;
                    mime_type: string;
                };
                role?: "owner" | "admin" | "member";
                department?: {
                    id: string;
                    name: string;
                };
            };
            start_date?: string;
            end_date?: string;
            reason?: string;
            document?: {
                file_name: string;
                original_name: string;
                file_size: number;
                mime_type: string;
            };
            status?: "pending" | "approved" | "rejected" | "cancelled";
            leave_type?: string;
            approver_type?: "owner" | "member";
            approver_owner_id?: string;
            approver_member_id?: string;
            approver_owner?: {
                id: string;
                name: string;
                email: string;
                image?: {
                    file_name: string;
                    original_name: string;
                    file_size: number;
                    mime_type: string;
                };
            };
            approver_member?: {
                id: string;
                employee_id: string;
                first_name: string;
                last_name?: string;
                nickname?: string;
                image?: {
                    file_name: string;
                    original_name: string;
                    file_size: number;
                    mime_type: string;
                };
                role?: "owner" | "admin" | "member";
                department?: {
                    id: string;
                    name: string;
                };
            };
            approved_at?: string;
            created_at?: string;
            updated_at?: string;
        };
        message: string;
        status: HttpStatus;
        details: any;
    }>;
    updateLeave(id: string, data: updateLeaveDto, owner_id: string, ctx: PermissionUserContext): Promise<{
        data: {
            id?: string;
            member_id?: string;
            member?: {
                id: string;
                employee_id: string;
                first_name: string;
                last_name?: string;
                nickname?: string;
                image?: {
                    file_name: string;
                    original_name: string;
                    file_size: number;
                    mime_type: string;
                };
                role?: "owner" | "admin" | "member";
                department?: {
                    id: string;
                    name: string;
                };
            };
            start_date?: string;
            end_date?: string;
            reason?: string;
            document?: {
                file_name: string;
                original_name: string;
                file_size: number;
                mime_type: string;
            };
            status?: "pending" | "approved" | "rejected" | "cancelled";
            leave_type?: string;
            approver_type?: "owner" | "member";
            approver_owner_id?: string;
            approver_member_id?: string;
            approver_owner?: {
                id: string;
                name: string;
                email: string;
                image?: {
                    file_name: string;
                    original_name: string;
                    file_size: number;
                    mime_type: string;
                };
            };
            approver_member?: {
                id: string;
                employee_id: string;
                first_name: string;
                last_name?: string;
                nickname?: string;
                image?: {
                    file_name: string;
                    original_name: string;
                    file_size: number;
                    mime_type: string;
                };
                role?: "owner" | "admin" | "member";
                department?: {
                    id: string;
                    name: string;
                };
            };
            approved_at?: string;
            created_at?: string;
            updated_at?: string;
        };
        message: string;
        status: HttpStatus;
        details: any;
    }>;
    updateBulkLeaveStatus(data: bulkUpdateLeaveStatusDto, owner_id: string, ctx: PermissionUserContext): Promise<{
        data: any;
        message: string;
        status: HttpStatus;
        details: any;
    }>;
    updateLeaveStatus(id: string, data: updateLeaveStatusDto, owner_id: string): Promise<{
        data: {
            id?: string;
            member_id?: string;
            member?: {
                id: string;
                employee_id: string;
                first_name: string;
                last_name?: string;
                nickname?: string;
                image?: {
                    file_name: string;
                    original_name: string;
                    file_size: number;
                    mime_type: string;
                };
                role?: "owner" | "admin" | "member";
                department?: {
                    id: string;
                    name: string;
                };
            };
            start_date?: string;
            end_date?: string;
            reason?: string;
            document?: {
                file_name: string;
                original_name: string;
                file_size: number;
                mime_type: string;
            };
            status?: "pending" | "approved" | "rejected" | "cancelled";
            leave_type?: string;
            approver_type?: "owner" | "member";
            approver_owner_id?: string;
            approver_member_id?: string;
            approver_owner?: {
                id: string;
                name: string;
                email: string;
                image?: {
                    file_name: string;
                    original_name: string;
                    file_size: number;
                    mime_type: string;
                };
            };
            approver_member?: {
                id: string;
                employee_id: string;
                first_name: string;
                last_name?: string;
                nickname?: string;
                image?: {
                    file_name: string;
                    original_name: string;
                    file_size: number;
                    mime_type: string;
                };
                role?: "owner" | "admin" | "member";
                department?: {
                    id: string;
                    name: string;
                };
            };
            approved_at?: string;
            created_at?: string;
            updated_at?: string;
        };
        message: string;
        status: HttpStatus;
        details: any;
    }>;
    deleteLeave(id: string, owner_id: string, ctx: PermissionUserContext): Promise<{
        data: any;
        message: string;
        status: HttpStatus;
        details: any;
    }>;
    getMembersLeaveBalance(owner_id: string, ctx: PermissionUserContext, dataScope?: 'own' | 'all'): Promise<{
        data: {
            id: string;
            member_id: string;
            first_name?: string;
            last_name?: string;
            image?: {
                file_name: string;
                original_name: string;
                file_size: number;
                mime_type: string;
            };
            department_id?: string;
            department_name?: string;
            used_leaves?: number;
            remaining_leaves?: number;
            total_leaves?: number;
        }[];
        message: string;
        status: HttpStatus;
        details: any;
    }>;
    updateAttendanceForLeave(startDate: Date, endDate: Date, member_id: string, owner_id: string, status?: AttendanceStatusEnum): Promise<void>;
}
