import { ActionSource } from '../../booking-audit/lib/types/actionSource';
import { BookingReferenceRepository } from '../../bookingReference/repositories/BookingReferenceRepository';
import { ProfileRepository } from '../../profile/repositories/ProfileRepository';
import { UserRepository } from '../../users/repositories/UserRepository';
import { bookingCancelInput } from '../../../prisma/zod-utils';
import { z } from 'zod';
import { BookingRepository } from '../repositories/BookingRepository';
import { PrismaBookingAttendeeRepository } from '../repositories/PrismaBookingAttendeeRepository';
import { CancelBookingMeta, CancelRegularBookingData } from './dto/BookingCancel';
import { getBookingToDelete } from './getBookingToDelete';
import { IBookingCancelService } from './interfaces/IBookingCancelService';
type PlatformParams = {
    platformClientId?: string;
    platformRescheduleUrl?: string;
    platformCancelUrl?: string;
    platformBookingUrl?: string;
    arePlatformEmailsEnabled?: boolean;
};
export type BookingToDelete = Awaited<ReturnType<typeof getBookingToDelete>>;
export type CancelBookingInput = {
    userId?: number;
    userUuid?: string;
    bookingData: z.infer<typeof bookingCancelInput>;
    actionSource?: ActionSource;
} & PlatformParams;
type Dependencies = {
    userRepository: UserRepository;
    bookingRepository: BookingRepository;
    profileRepository: ProfileRepository;
    bookingReferenceRepository: BookingReferenceRepository;
    attendeeRepository: PrismaBookingAttendeeRepository;
};
declare function handler(input: CancelBookingInput, dependencies?: Dependencies): Promise<{
    success: true;
    onlyRemovedAttendee: true;
    bookingId: number;
    bookingUid: string;
    message: string;
    isPlatformManagedUserBooking: boolean;
} | {
    success: true;
    message: string;
    onlyRemovedAttendee: false;
    bookingId: number;
    bookingUid: string;
    isPlatformManagedUserBooking: boolean;
}>;
type BookingCancelServiceDependencies = {
    userRepository: UserRepository;
    bookingRepository: BookingRepository;
    profileRepository: ProfileRepository;
    bookingReferenceRepository: BookingReferenceRepository;
    attendeeRepository: PrismaBookingAttendeeRepository;
};
/**
 * Takes care of cancelling bookings. This includes regular bookings, recurring bookings, seated bookings, etc.
 * Handles both individual booking cancellations and bulk cancellations for recurring events.
 */
export declare class BookingCancelService implements IBookingCancelService {
    private readonly deps;
    constructor(deps: BookingCancelServiceDependencies);
    cancelBooking(input: {
        bookingData: CancelRegularBookingData;
        bookingMeta?: CancelBookingMeta;
    }): Promise<{
        success: true;
        onlyRemovedAttendee: true;
        bookingId: number;
        bookingUid: string;
        message: string;
        isPlatformManagedUserBooking: boolean;
    } | {
        success: true;
        message: string;
        onlyRemovedAttendee: false;
        bookingId: number;
        bookingUid: string;
        isPlatformManagedUserBooking: boolean;
    }>;
}
export default handler;
//# sourceMappingURL=handleCancelBooking.d.ts.map