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, ErrorResponse } from '../../config';
import { DevicesService } from '../devices/devices.service';
import { IpWhitelistService } from '../ip-whitelist/ip-whitelist.service';
import { AdminManualAttendanceDto, AttendanceFilterDto, AttendanceReportFilterDto, CreateQrPointDto, ScanQrAttendanceDto, TeacherCheckInDto, TeacherCheckOutDto, UpdateQrPointDto } from './attendance.dto';
export declare class AttendanceService {
    private readonly db;
    private readonly permissionResolver;
    private readonly orgTimezone;
    private readonly ipWhitelistService;
    private readonly devicesService;
    constructor(db: DatabaseService, permissionResolver: PermissionResolverService, orgTimezone: OrgTimezoneService, ipWhitelistService: IpWhitelistService, devicesService: DevicesService);
    private getDayOfWeekInTimezone;
    private getPermissions;
    private generateQrDataUrl;
    private calculateHaversineDistanceMeters;
    private validateAttendanceRequirements;
    getPrimaryQrPoint(ownerId: string): Promise<{
        status: HttpStatus;
        message: string;
        data: {
            id: string;
            owner_id: string;
            label: string;
            code: string;
            is_active: boolean;
            qr_data_url?: string;
            created_at?: string;
            updated_at?: string;
        };
    }>;
    listQrPoints(ownerId: string): Promise<{
        status: HttpStatus;
        message: string;
        data: {
            id: string;
            owner_id: string;
            label: string;
            code: string;
            is_active: boolean;
            qr_data_url?: string;
            created_at?: string;
            updated_at?: string;
        }[];
    }>;
    createQrPoint(ownerId: string, dto: CreateQrPointDto): Promise<{
        status: HttpStatus;
        message: string;
        data: {
            id: string;
            owner_id: string;
            label: string;
            code: string;
            is_active: boolean;
            qr_data_url?: string;
            created_at?: string;
            updated_at?: string;
        };
    }>;
    updateQrPoint(ownerId: string, id: string, dto: UpdateQrPointDto): Promise<{
        status: HttpStatus;
        message: string;
        data: {
            id: string;
            owner_id: string;
            label: string;
            code: string;
            is_active: boolean;
            qr_data_url?: string;
            created_at?: string;
            updated_at?: string;
        };
    }>;
    deleteQrPoint(ownerId: string, id: string): Promise<{
        status: HttpStatus;
        message: string;
    }>;
    scanQr(memberId: string, ownerId: string, body: ScanQrAttendanceDto, clientIp: string): Promise<{
        status: HttpStatus;
        message: string;
        data: {
            action: "CHECK_IN" | "CHECK_OUT" | "ALREADY_COMPLETED";
            message: string;
            status?: "all" | "present" | "absent" | "late" | "half_day" | "on_leave" | "remote" | "check_in" | "on_break" | "holiday" | "weekend";
            check_in?: string;
            check_out?: string;
            work_hours?: number;
            break_hours?: number;
            net_hours?: number;
            overtime_hours?: number;
            attendance?: {
                id: string;
                member_id: string;
                member?: {
                    id: string;
                    first_name: string;
                    employee_id: string;
                    last_name?: string;
                    nickname?: string;
                    role?: "owner" | "admin" | "member";
                    image?: {
                        file_name: string;
                        original_name: string;
                        file_size: number;
                        mime_type: string;
                    };
                    department?: {
                        id: string;
                        name: string;
                    };
                };
                date?: string;
                type?: string;
                check_in?: string;
                check_out?: string;
                work_hours?: number;
                break_hours?: number;
                net_hours?: number;
                overtime_hours?: number;
                status?: "all" | "present" | "absent" | "late" | "half_day" | "on_leave" | "remote" | "check_in" | "on_break" | "holiday" | "weekend";
                check_in_ip?: string;
                check_out_ip?: string;
                device_id?: string;
                attendance_method?: string;
                qr_point_id?: string;
                check_in_latitude?: number;
                check_in_longitude?: number;
                check_in_distance_meters?: number;
                check_out_latitude?: number;
                check_out_longitude?: number;
                check_out_distance_meters?: number;
                note?: string;
                created_at?: string;
                updated_at?: string;
            };
        };
    }>;
    checkIn(memberId: string, ownerId: string, body: TeacherCheckInDto, clientIp: string): Promise<{
        status: HttpStatus;
        message: string;
        data: {
            id: string;
            member_id: string;
            member?: {
                id: string;
                first_name: string;
                employee_id: string;
                last_name?: string;
                nickname?: string;
                role?: "owner" | "admin" | "member";
                image?: {
                    file_name: string;
                    original_name: string;
                    file_size: number;
                    mime_type: string;
                };
                department?: {
                    id: string;
                    name: string;
                };
            };
            date?: string;
            type?: string;
            check_in?: string;
            check_out?: string;
            work_hours?: number;
            break_hours?: number;
            net_hours?: number;
            overtime_hours?: number;
            status?: "all" | "present" | "absent" | "late" | "half_day" | "on_leave" | "remote" | "check_in" | "on_break" | "holiday" | "weekend";
            check_in_ip?: string;
            check_out_ip?: string;
            device_id?: string;
            attendance_method?: string;
            qr_point_id?: string;
            check_in_latitude?: number;
            check_in_longitude?: number;
            check_in_distance_meters?: number;
            check_out_latitude?: number;
            check_out_longitude?: number;
            check_out_distance_meters?: number;
            note?: string;
            created_at?: string;
            updated_at?: string;
        };
    }>;
    checkOut(memberId: string, ownerId: string, body: TeacherCheckOutDto, clientIp: string): Promise<{
        status: HttpStatus;
        message: string;
        data: {
            id: string;
            member_id: string;
            member?: {
                id: string;
                first_name: string;
                employee_id: string;
                last_name?: string;
                nickname?: string;
                role?: "owner" | "admin" | "member";
                image?: {
                    file_name: string;
                    original_name: string;
                    file_size: number;
                    mime_type: string;
                };
                department?: {
                    id: string;
                    name: string;
                };
            };
            date?: string;
            type?: string;
            check_in?: string;
            check_out?: string;
            work_hours?: number;
            break_hours?: number;
            net_hours?: number;
            overtime_hours?: number;
            status?: "all" | "present" | "absent" | "late" | "half_day" | "on_leave" | "remote" | "check_in" | "on_break" | "holiday" | "weekend";
            check_in_ip?: string;
            check_out_ip?: string;
            device_id?: string;
            attendance_method?: string;
            qr_point_id?: string;
            check_in_latitude?: number;
            check_in_longitude?: number;
            check_in_distance_meters?: number;
            check_out_latitude?: number;
            check_out_longitude?: number;
            check_out_distance_meters?: number;
            note?: string;
            created_at?: string;
            updated_at?: string;
        };
    }>;
    createOrUpdateAttendance(data: AdminManualAttendanceDto, owner_id: string, ctx: PermissionUserContext): Promise<{
        status: HttpStatus;
        message: string;
        data: {
            id: string;
            member_id: string;
            member?: {
                id: string;
                first_name: string;
                employee_id: string;
                last_name?: string;
                nickname?: string;
                role?: "owner" | "admin" | "member";
                image?: {
                    file_name: string;
                    original_name: string;
                    file_size: number;
                    mime_type: string;
                };
                department?: {
                    id: string;
                    name: string;
                };
            };
            date?: string;
            type?: string;
            check_in?: string;
            check_out?: string;
            work_hours?: number;
            break_hours?: number;
            net_hours?: number;
            overtime_hours?: number;
            status?: "all" | "present" | "absent" | "late" | "half_day" | "on_leave" | "remote" | "check_in" | "on_break" | "holiday" | "weekend";
            check_in_ip?: string;
            check_out_ip?: string;
            device_id?: string;
            attendance_method?: string;
            qr_point_id?: string;
            check_in_latitude?: number;
            check_in_longitude?: number;
            check_in_distance_meters?: number;
            check_out_latitude?: number;
            check_out_longitude?: number;
            check_out_distance_meters?: number;
            note?: string;
            created_at?: string;
            updated_at?: string;
        };
    }>;
    getAttendances(query: AttendanceFilterDto, owner_id: string, ctx: PermissionUserContext): Promise<ErrorResponse | {
        status: HttpStatus;
        message: string;
        data: {
            id: string;
            member_id: string;
            member?: {
                id: string;
                first_name: string;
                employee_id: string;
                last_name?: string;
                nickname?: string;
                role?: "owner" | "admin" | "member";
                image?: {
                    file_name: string;
                    original_name: string;
                    file_size: number;
                    mime_type: string;
                };
                department?: {
                    id: string;
                    name: string;
                };
            };
            date?: string;
            type?: string;
            check_in?: string;
            check_out?: string;
            work_hours?: number;
            break_hours?: number;
            net_hours?: number;
            overtime_hours?: number;
            status?: "all" | "present" | "absent" | "late" | "half_day" | "on_leave" | "remote" | "check_in" | "on_break" | "holiday" | "weekend";
            check_in_ip?: string;
            check_out_ip?: string;
            device_id?: string;
            attendance_method?: string;
            qr_point_id?: string;
            check_in_latitude?: number;
            check_in_longitude?: number;
            check_in_distance_meters?: number;
            check_out_latitude?: number;
            check_out_longitude?: number;
            check_out_distance_meters?: number;
            note?: string;
            created_at?: string;
            updated_at?: string;
        }[];
        pagination: {
            total: any;
            page: number;
            limit: number;
            totalPages: number;
        };
    }>;
    getTodayAttendances(owner_id: string, query: AttendanceFilterDto, ctx: PermissionUserContext): Promise<{
        status: HttpStatus;
        message: string;
        data: any;
        details: {
            summary: {
                member_count: any;
                present_count: any;
                absent_count: any;
                leave_count: any;
            };
            pagination: {
                total: any;
                current_page: number;
                items_per_page: number;
                total_pages: number;
            };
        };
    }>;
    getTodayAttendancesByMember(memberId: string, owner_id: string, dateArg: any, ctx: PermissionUserContext): Promise<{
        status: HttpStatus;
        message: string;
        data: {
            id: string;
            member_id: string;
            member?: {
                id: string;
                first_name: string;
                employee_id: string;
                last_name?: string;
                nickname?: string;
                role?: "owner" | "admin" | "member";
                image?: {
                    file_name: string;
                    original_name: string;
                    file_size: number;
                    mime_type: string;
                };
                department?: {
                    id: string;
                    name: string;
                };
            };
            date?: string;
            type?: string;
            check_in?: string;
            check_out?: string;
            work_hours?: number;
            break_hours?: number;
            net_hours?: number;
            overtime_hours?: number;
            status?: "all" | "present" | "absent" | "late" | "half_day" | "on_leave" | "remote" | "check_in" | "on_break" | "holiday" | "weekend";
            check_in_ip?: string;
            check_out_ip?: string;
            device_id?: string;
            attendance_method?: string;
            qr_point_id?: string;
            check_in_latitude?: number;
            check_in_longitude?: number;
            check_in_distance_meters?: number;
            check_out_latitude?: number;
            check_out_longitude?: number;
            check_out_distance_meters?: number;
            note?: string;
            created_at?: string;
            updated_at?: string;
        };
    }>;
    getAttendancesByMember(memberId: string, query: AttendanceFilterDto, owner_id: string, ctx: PermissionUserContext): Promise<ErrorResponse | {
        status: HttpStatus;
        message: string;
        data: {
            id: string;
            member_id: string;
            member?: {
                id: string;
                first_name: string;
                employee_id: string;
                last_name?: string;
                nickname?: string;
                role?: "owner" | "admin" | "member";
                image?: {
                    file_name: string;
                    original_name: string;
                    file_size: number;
                    mime_type: string;
                };
                department?: {
                    id: string;
                    name: string;
                };
            };
            date?: string;
            type?: string;
            check_in?: string;
            check_out?: string;
            work_hours?: number;
            break_hours?: number;
            net_hours?: number;
            overtime_hours?: number;
            status?: "all" | "present" | "absent" | "late" | "half_day" | "on_leave" | "remote" | "check_in" | "on_break" | "holiday" | "weekend";
            check_in_ip?: string;
            check_out_ip?: string;
            device_id?: string;
            attendance_method?: string;
            qr_point_id?: string;
            check_in_latitude?: number;
            check_in_longitude?: number;
            check_in_distance_meters?: number;
            check_out_latitude?: number;
            check_out_longitude?: number;
            check_out_distance_meters?: number;
            note?: string;
            created_at?: string;
            updated_at?: string;
        }[];
        pagination: {
            total: any;
            page: number;
            limit: number;
            totalPages: number;
        };
    }>;
    getAttendanceById(attendanceId: string, owner_id: string, ctx: PermissionUserContext): Promise<{
        status: HttpStatus;
        message: string;
        data: {
            id: string;
            member_id: string;
            member?: {
                id: string;
                first_name: string;
                employee_id: string;
                last_name?: string;
                nickname?: string;
                role?: "owner" | "admin" | "member";
                image?: {
                    file_name: string;
                    original_name: string;
                    file_size: number;
                    mime_type: string;
                };
                department?: {
                    id: string;
                    name: string;
                };
            };
            date?: string;
            type?: string;
            check_in?: string;
            check_out?: string;
            work_hours?: number;
            break_hours?: number;
            net_hours?: number;
            overtime_hours?: number;
            status?: "all" | "present" | "absent" | "late" | "half_day" | "on_leave" | "remote" | "check_in" | "on_break" | "holiday" | "weekend";
            check_in_ip?: string;
            check_out_ip?: string;
            device_id?: string;
            attendance_method?: string;
            qr_point_id?: string;
            check_in_latitude?: number;
            check_in_longitude?: number;
            check_in_distance_meters?: number;
            check_out_latitude?: number;
            check_out_longitude?: number;
            check_out_distance_meters?: number;
            note?: string;
            created_at?: string;
            updated_at?: string;
        };
    }>;
    getAttendanceReport(query: AttendanceReportFilterDto, owner_id: string, ctx: PermissionUserContext): Promise<{
        status: HttpStatus;
        message: string;
        data: {
            id: string;
            first_name: string;
            employee_id: string;
            attendance_count: number;
            late_count: number;
            half_day_count: number;
            leave_count: number;
            absent_count: number;
            total_working_days: number;
            total_working_hours: number;
            total_overtime: number;
            attendances: {
                id: string;
                member_id: string;
                member?: {
                    id: string;
                    first_name: string;
                    employee_id: string;
                    last_name?: string;
                    nickname?: string;
                    role?: "owner" | "admin" | "member";
                    image?: {
                        file_name: string;
                        original_name: string;
                        file_size: number;
                        mime_type: string;
                    };
                    department?: {
                        id: string;
                        name: string;
                    };
                };
                date?: string;
                type?: string;
                check_in?: string;
                check_out?: string;
                work_hours?: number;
                break_hours?: number;
                net_hours?: number;
                overtime_hours?: number;
                status?: "all" | "present" | "absent" | "late" | "half_day" | "on_leave" | "remote" | "check_in" | "on_break" | "holiday" | "weekend";
                check_in_ip?: string;
                check_out_ip?: string;
                device_id?: string;
                attendance_method?: string;
                qr_point_id?: string;
                check_in_latitude?: number;
                check_in_longitude?: number;
                check_in_distance_meters?: number;
                check_out_latitude?: number;
                check_out_longitude?: number;
                check_out_distance_meters?: number;
                note?: string;
                created_at?: string;
                updated_at?: string;
            }[];
            last_name?: string;
            nickname?: string;
            role?: "owner" | "admin" | "member";
            image?: {
                file_name: string;
                original_name: string;
                file_size: number;
                mime_type: string;
            };
            department?: {
                id: string;
                name: string;
            };
            total_net_hours?: number;
            attendance_percentage?: number;
        }[];
    }>;
    createPreviousAttendanceData(owner_id: string, ctx: PermissionUserContext): Promise<{
        status: HttpStatus;
        message: string;
    }>;
}
