import { Repository } from 'typeorm';
import { ClsService } from 'nestjs-cls';
import { BookingRepository } from '../repositories/booking.repository';
import { AssignTransportItemDto, BulkAssignTransportItemDto, PatchActivityItemDto, BulkPatchActivityItemDto, PatchHotelItemDto, PatchSpecialItemDto } from '../dto';
import { BookingStatus } from '../../../entities/booking.entity';
import { BookingTransportItemEntity } from '../../../entities/booking-transport-item.entity';
import { BookingActivityItemEntity } from '../../../entities/booking-activity-item.entity';
import { BookingHotelItemEntity } from '../../../entities/booking-hotel-item.entity';
import { BookingSpecialItemEntity } from '../../../entities/booking-special-item.entity';
import { BookingFlightDetailEntity } from '../../../entities/booking-flight-detail.entity';
import { ServicePaymentCollectionEntity } from '../../../entities/service-payment-collection.entity';
import { BookingCashCollectionEntity } from '../../../entities/booking-cash-collection.entity';
import { QueryEntity } from '../../../entities/query.entity';
import { ActivityTicketItemEntity } from '../../../entities/activity-ticket-item.entity';
import { AuditService } from '../../audit/audit.service';
import { PaymentSettlementService } from '../../payment-settlement/payment-settlement.service';
import { TaxSlabResolverService } from '../../../common/services/tax-slab-resolver.service';
import { BookingItineraryService } from './booking-itinerary.service';
type MovementPcMeta = {
    collection_id: string | null;
    required: boolean;
    expected_amount: number;
    currency_id: string | null;
    currency_code: string;
    status: 'PENDING' | 'COLLECTED' | 'CANCELLED' | null;
    notes: string | null;
    latest_actual_amount: number | null;
    latest_difference_reason: string | null;
    latest_collected_at: string | null;
};
export declare class DriverAssignmentService {
    private readonly repo;
    private readonly cls;
    private readonly auditService;
    private readonly transportItemRepo;
    private readonly activityItemRepo;
    private readonly hotelItemRepo;
    private readonly specialItemRepo;
    private readonly flightDetailRepo;
    private readonly ticketItemRepo;
    private readonly paymentCollectionRepo;
    private readonly bookingCashCollectionRepo;
    private readonly queryRepo;
    private readonly settlements;
    private readonly taxResolver;
    private readonly itinerary;
    constructor(repo: BookingRepository, cls: ClsService, auditService: AuditService, transportItemRepo: Repository<BookingTransportItemEntity>, activityItemRepo: Repository<BookingActivityItemEntity>, hotelItemRepo: Repository<BookingHotelItemEntity>, specialItemRepo: Repository<BookingSpecialItemEntity>, flightDetailRepo: Repository<BookingFlightDetailEntity>, ticketItemRepo: Repository<ActivityTicketItemEntity>, paymentCollectionRepo: Repository<ServicePaymentCollectionEntity>, bookingCashCollectionRepo: Repository<BookingCashCollectionEntity>, queryRepo: Repository<QueryEntity>, settlements: PaymentSettlementService, taxResolver: TaxSlabResolverService, itinerary: BookingItineraryService);
    private resolveSupplierSnapshot;
    private getTenantId;
    private canOverrideStatus;
    getTransportDates(destinationId: string): Promise<string[]>;
    private itemSupplierCfg;
    private replaceItemSuppliersFromArray;
    private syncItemSuppliersFromColumns;
    getMovementChart(destinationId: string | undefined, date: string, filters?: {
        payment_collection_status?: 'REQUIRED' | 'PENDING' | 'COLLECTED';
        date_to?: string;
    }): Promise<{
        summary: {
            total_ops: number;
            transfers: number;
            activities: number;
            specials: number;
            active_drivers: number;
            completed: number;
            scheduled: number;
        };
        by_driver: any[];
        by_booking: any[];
        by_activity: any[];
        by_special: {
            id: string;
            type: "special";
            booking_id: string;
            booking_number: string;
            booking_status: BookingStatus;
            booking_hold_reason: string | null;
            payment_gate: import("./booking-payment-gate").BookingPaymentGate;
            guest_name: string;
            guest_mobile: string;
            salesperson_name: string;
            pax: number;
            service_name: string;
            date: string | null;
            total_price: number;
            actual_supplier_cost: number | null;
            supplier_id: string | null;
            supplier_name: string | null;
            supplier_phone: string | null;
            suppliers: {
                payment_collection: MovementPcMeta;
                id: string;
                supplier_id: string | null;
                name: string;
                phone: string;
                role: string;
                sort_order: number;
                actual_supplier_cost: number | null;
                driver_id: string | null;
                driver_name: string;
                driver_phone: string;
            }[];
            comments: string | null;
            payment_collection: MovementPcMeta;
            destination_currency_id: string | null;
            cash_collection: {
                id: string;
                booking_id: string;
                cash_collection_id?: string;
                transport_item_id: string | null;
                activity_item_id: string | null;
                special_item_id: string | null;
                currency_id: string;
                currency_code: string;
                has_expense: boolean;
                has_cash: boolean;
                collected_by_type: "OWN" | "SUPPLIER" | null;
                collector_name: string | null;
                supplier_id: string | null;
                supplier_name: string | null;
                source_kind: "TRANSPORT" | "ACTIVITY" | "SPECIAL" | null;
                activity_id: string | null;
                activity_name: string | null;
                driver_id: string | null;
                driver_name: string | null;
                expected_amount: number;
                notes: string | null;
                status: "PENDING" | "COLLECTED" | "CANCELLED" | null;
                actual_amount: number | null;
                collected_at: string | null;
                difference_reason: string | null;
                collected_by_name: string | null;
                collection_date: string;
                cash_expected_amount: number;
                cash_status: "PENDING" | "COLLECTED" | null;
                cash_actual_amount: number | null;
                cash_collected_by_type: "OWN" | "SUPPLIER" | null;
                cash_collector_name: string | null;
            } | null;
            cash_collections: Record<string, unknown>[];
        }[];
    }>;
    assignTransportItem(itemId: string, dto: AssignTransportItemDto): Promise<{
        id: string;
        message: string;
    }>;
    private getBookingDueDate;
    private assertOverrideWithinParty;
    patchActivityItem(itemId: string, dto: PatchActivityItemDto): Promise<{
        id: string;
        message: string;
    }>;
    patchHotelItem(itemId: string, dto: PatchHotelItemDto): Promise<{
        id: string;
        message: string;
    }>;
    patchSpecialItem(itemId: string, dto: PatchSpecialItemDto): Promise<{
        id: string;
        message: string;
    }>;
    bulkPatchActivityItems(dto: BulkPatchActivityItemDto): Promise<{
        updated: number;
        message: string;
    }>;
    bulkAssignTransportItems(dto: BulkAssignTransportItemDto): Promise<{
        count: number;
        message: string;
    }>;
    private sumPaxForItems;
    private sumExistingDriverPax;
    private sumDriverDayPax;
    private resolveSalesNames;
}
export {};
