import type { AvailabilityRule } from "./availability";
import type { VenueRecord } from "./bookingRecords";
import type { DashboardAppointmentResource, AppointmentService } from "./bookingOperations";
import type { ApiClient } from "./request";
import { z } from "zod";
export type AppointmentSetupTargetStep = "services" | "people" | "assignments" | "availability" | "review";
export type AppointmentSetupReadiness = Readonly<{
    kind: "not_applicable";
}> | Readonly<{
    kind: "not_started";
    targetStep: "services";
}> | Readonly<{
    kind: "needs_services";
    targetStep: "services";
}> | Readonly<{
    kind: "needs_practitioner";
    targetStep: "people";
}> | Readonly<{
    kind: "needs_service_assignment";
    targetStep: "assignments";
}> | Readonly<{
    kind: "needs_availability";
    targetStep: "availability";
}> | Readonly<{
    kind: "bookable";
    bookableServiceCount: number;
    targetStep: "review";
}>;
export type AppointmentPractitionerMode = Readonly<{
    kind: "solo_public_identity";
    reason: "single_practitioner_entitlement";
}> | Readonly<{
    kind: "studio_practitioners";
    reason: "multiple_practitioners_entitlement";
}>;
export type AppointmentSetupSeedCandidate = Readonly<{
    id: string;
    title: string;
    createdAt: string;
    isActive: boolean;
    hasOnboardingMetadata: boolean;
}>;
export type AppointmentSetupSeedInvalidMetadata = Readonly<{
    serviceId: string;
    issues: readonly string[];
}>;
export type AppointmentSetupSeedSelection = Readonly<{
    kind: "empty";
    invalidMetadata: readonly AppointmentSetupSeedInvalidMetadata[];
}> | Readonly<{
    kind: "selected";
    reason: "onboarding_metadata" | "first_created_active_fallback";
    serviceId: string;
    candidate: AppointmentSetupSeedCandidate;
    invalidMetadata: readonly AppointmentSetupSeedInvalidMetadata[];
}> | Readonly<{
    kind: "ambiguous";
    reason: "multiple_onboarding_metadata_candidates" | "multiple_active_fallback_candidates";
    candidates: readonly AppointmentSetupSeedCandidate[];
    suggestedServiceId: string;
    invalidMetadata: readonly AppointmentSetupSeedInvalidMetadata[];
}>;
export type AppointmentSetupServiceResourceLink = Readonly<{
    serviceId: string;
    resourceId: string;
}>;
export type AppointmentSetupBookingNotice = Readonly<{
    minLeadMinutes: number;
    maxBookingNoticeMinutes: number;
}>;
export type AppointmentSetupResponse = Readonly<{
    practitionerMode: AppointmentPractitionerMode;
    seedSelection: AppointmentSetupSeedSelection;
    readiness: AppointmentSetupReadiness;
    services: readonly AppointmentService[];
    resources: readonly DashboardAppointmentResource[];
    venues: readonly VenueRecord[];
    serviceResourceLinks: readonly AppointmentSetupServiceResourceLink[];
    availabilityRules: readonly AvailabilityRule[];
    bookingNotice: AppointmentSetupBookingNotice;
}>;
export declare const appointmentSetupRefSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
    kind: z.ZodLiteral<"existing">;
    id: z.ZodString;
}, z.core.$strip>, z.ZodObject<{
    kind: z.ZodLiteral<"new">;
    draftId: z.ZodString;
}, z.core.$strip>], "kind">;
export type AppointmentSetupRef = z.infer<typeof appointmentSetupRefSchema>;
export declare const appointmentSetupVenueChoiceSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
    kind: z.ZodLiteral<"none">;
}, z.core.$strip>, z.ZodObject<{
    kind: z.ZodLiteral<"existing">;
    venueId: z.ZodString;
}, z.core.$strip>, z.ZodObject<{
    kind: z.ZodLiteral<"create">;
    draftId: z.ZodString;
    title: z.ZodString;
    description: z.ZodNullable<z.ZodString>;
    timezone: z.ZodNullable<z.ZodString>;
    addressJson: z.ZodRecord<z.ZodString, z.ZodUnknown>;
    locationJson: z.ZodNullable<z.ZodObject<{
        lat: z.ZodNumber;
        lng: z.ZodNumber;
    }, z.core.$strip>>;
}, z.core.$strip>], "kind">;
export type AppointmentSetupVenueChoice = z.infer<typeof appointmentSetupVenueChoiceSchema>;
export declare const appointmentSetupPaymentDraftSchema: z.ZodObject<{
    priceType: z.ZodUnion<readonly [z.ZodLiteral<"free">, z.ZodLiteral<"paid">]>;
}, z.core.$strip>;
export type AppointmentSetupPaymentDraft = z.infer<typeof appointmentSetupPaymentDraftSchema>;
export declare const appointmentSetupServiceAssignmentDraftSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
    kind: z.ZodLiteral<"all_practitioners">;
}, z.core.$strip>, z.ZodObject<{
    kind: z.ZodLiteral<"selected_practitioners">;
    resourceRefs: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
        kind: z.ZodLiteral<"existing">;
        id: z.ZodString;
    }, z.core.$strip>, z.ZodObject<{
        kind: z.ZodLiteral<"new">;
        draftId: z.ZodString;
    }, z.core.$strip>], "kind">>;
}, z.core.$strip>], "kind">;
export type AppointmentSetupServiceAssignmentDraft = z.infer<typeof appointmentSetupServiceAssignmentDraftSchema>;
export declare const appointmentSetupServiceDraftSchema: z.ZodObject<{
    ref: z.ZodDiscriminatedUnion<[z.ZodObject<{
        kind: z.ZodLiteral<"existing">;
        id: z.ZodString;
    }, z.core.$strip>, z.ZodObject<{
        kind: z.ZodLiteral<"new">;
        draftId: z.ZodString;
    }, z.core.$strip>], "kind">;
    title: z.ZodString;
    description: z.ZodNullable<z.ZodString>;
    durationMinutes: z.ZodNumber;
    priceAmount: z.ZodNullable<z.ZodNumber>;
    isActive: z.ZodBoolean;
    locationType: z.ZodUnion<readonly [z.ZodLiteral<"virtual">, z.ZodLiteral<"in_person">, z.ZodLiteral<"hybrid">]>;
    venue: z.ZodDiscriminatedUnion<[z.ZodObject<{
        kind: z.ZodLiteral<"none">;
    }, z.core.$strip>, z.ZodObject<{
        kind: z.ZodLiteral<"existing">;
        venueId: z.ZodString;
    }, z.core.$strip>, z.ZodObject<{
        kind: z.ZodLiteral<"create">;
        draftId: z.ZodString;
        title: z.ZodString;
        description: z.ZodNullable<z.ZodString>;
        timezone: z.ZodNullable<z.ZodString>;
        addressJson: z.ZodRecord<z.ZodString, z.ZodUnknown>;
        locationJson: z.ZodNullable<z.ZodObject<{
            lat: z.ZodNumber;
            lng: z.ZodNumber;
        }, z.core.$strip>>;
    }, z.core.$strip>], "kind">;
    timezone: z.ZodNullable<z.ZodString>;
    payment: z.ZodObject<{
        priceType: z.ZodUnion<readonly [z.ZodLiteral<"free">, z.ZodLiteral<"paid">]>;
    }, z.core.$strip>;
    assignment: z.ZodDiscriminatedUnion<[z.ZodObject<{
        kind: z.ZodLiteral<"all_practitioners">;
    }, z.core.$strip>, z.ZodObject<{
        kind: z.ZodLiteral<"selected_practitioners">;
        resourceRefs: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
            kind: z.ZodLiteral<"existing">;
            id: z.ZodString;
        }, z.core.$strip>, z.ZodObject<{
            kind: z.ZodLiteral<"new">;
            draftId: z.ZodString;
        }, z.core.$strip>], "kind">>;
    }, z.core.$strip>], "kind">;
}, z.core.$strip>;
export type AppointmentSetupServiceDraft = z.infer<typeof appointmentSetupServiceDraftSchema>;
export declare const appointmentSetupPractitionerDraftSchema: z.ZodObject<{
    ref: z.ZodDiscriminatedUnion<[z.ZodObject<{
        kind: z.ZodLiteral<"existing">;
        id: z.ZodString;
    }, z.core.$strip>, z.ZodObject<{
        kind: z.ZodLiteral<"new">;
        draftId: z.ZodString;
    }, z.core.$strip>], "kind">;
    displayName: z.ZodString;
    bio: z.ZodNullable<z.ZodString>;
    timezone: z.ZodString;
    colorHex: z.ZodNullable<z.ZodString>;
}, z.core.$strip>;
export type AppointmentSetupPractitionerDraft = z.infer<typeof appointmentSetupPractitionerDraftSchema>;
export declare const appointmentSetupWeeklyWindowDraftSchema: z.ZodObject<{
    weekday: z.ZodNumber;
    startTime: z.ZodString;
    endTime: z.ZodString;
}, z.core.$strip>;
export type AppointmentSetupWeeklyWindowDraft = z.infer<typeof appointmentSetupWeeklyWindowDraftSchema>;
export declare const appointmentSetupAvailabilityDraftSchema: z.ZodObject<{
    kind: z.ZodLiteral<"weekly_windows">;
    resourceRef: z.ZodDiscriminatedUnion<[z.ZodObject<{
        kind: z.ZodLiteral<"existing">;
        id: z.ZodString;
    }, z.core.$strip>, z.ZodObject<{
        kind: z.ZodLiteral<"new">;
        draftId: z.ZodString;
    }, z.core.$strip>], "kind">;
    serviceRef: z.ZodNullable<z.ZodDiscriminatedUnion<[z.ZodObject<{
        kind: z.ZodLiteral<"existing">;
        id: z.ZodString;
    }, z.core.$strip>, z.ZodObject<{
        kind: z.ZodLiteral<"new">;
        draftId: z.ZodString;
    }, z.core.$strip>], "kind">>;
    windows: z.ZodArray<z.ZodObject<{
        weekday: z.ZodNumber;
        startTime: z.ZodString;
        endTime: z.ZodString;
    }, z.core.$strip>>;
}, z.core.$strip>;
export type AppointmentSetupAvailabilityDraft = z.infer<typeof appointmentSetupAvailabilityDraftSchema>;
/**
 * Upper bounds on the booking-notice fields. Site-wide defaults — these caps
 * keep the slot engine arithmetic (`now + minutes * 60_000`) well inside safe
 * integer range and surface UI typos rather than silently storing nonsense.
 *
 * - `MIN_LEAD` capped at 28 days. A "must book at least N minutes ahead"
 *   value beyond that reads as misconfiguration.
 * - `MAX_NOTICE` capped at 10 years. A reasonable ceiling for "how far in
 *   the future bookings may be made"; safe against overflow.
 *
 * Mirror these in `bookingSettingsSchema` (storage layer) and the wizard
 * draft schemas — single source of truth for the contract.
 */
export declare const APPOINTMENT_DEFAULT_MIN_LEAD_MINUTES_MAX: number;
export declare const APPOINTMENT_DEFAULT_MAX_BOOKING_NOTICE_MINUTES_MAX: number;
export declare const appointmentSetupBookingNoticeSchema: z.ZodObject<{
    minLeadMinutes: z.ZodNumber;
    maxBookingNoticeMinutes: z.ZodNumber;
}, z.core.$strip>;
export declare const applyAppointmentSetupRequestSchema: z.ZodObject<{
    services: z.ZodArray<z.ZodObject<{
        ref: z.ZodDiscriminatedUnion<[z.ZodObject<{
            kind: z.ZodLiteral<"existing">;
            id: z.ZodString;
        }, z.core.$strip>, z.ZodObject<{
            kind: z.ZodLiteral<"new">;
            draftId: z.ZodString;
        }, z.core.$strip>], "kind">;
        title: z.ZodString;
        description: z.ZodNullable<z.ZodString>;
        durationMinutes: z.ZodNumber;
        priceAmount: z.ZodNullable<z.ZodNumber>;
        isActive: z.ZodBoolean;
        locationType: z.ZodUnion<readonly [z.ZodLiteral<"virtual">, z.ZodLiteral<"in_person">, z.ZodLiteral<"hybrid">]>;
        venue: z.ZodDiscriminatedUnion<[z.ZodObject<{
            kind: z.ZodLiteral<"none">;
        }, z.core.$strip>, z.ZodObject<{
            kind: z.ZodLiteral<"existing">;
            venueId: z.ZodString;
        }, z.core.$strip>, z.ZodObject<{
            kind: z.ZodLiteral<"create">;
            draftId: z.ZodString;
            title: z.ZodString;
            description: z.ZodNullable<z.ZodString>;
            timezone: z.ZodNullable<z.ZodString>;
            addressJson: z.ZodRecord<z.ZodString, z.ZodUnknown>;
            locationJson: z.ZodNullable<z.ZodObject<{
                lat: z.ZodNumber;
                lng: z.ZodNumber;
            }, z.core.$strip>>;
        }, z.core.$strip>], "kind">;
        timezone: z.ZodNullable<z.ZodString>;
        payment: z.ZodObject<{
            priceType: z.ZodUnion<readonly [z.ZodLiteral<"free">, z.ZodLiteral<"paid">]>;
        }, z.core.$strip>;
        assignment: z.ZodDiscriminatedUnion<[z.ZodObject<{
            kind: z.ZodLiteral<"all_practitioners">;
        }, z.core.$strip>, z.ZodObject<{
            kind: z.ZodLiteral<"selected_practitioners">;
            resourceRefs: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
                kind: z.ZodLiteral<"existing">;
                id: z.ZodString;
            }, z.core.$strip>, z.ZodObject<{
                kind: z.ZodLiteral<"new">;
                draftId: z.ZodString;
            }, z.core.$strip>], "kind">>;
        }, z.core.$strip>], "kind">;
    }, z.core.$strip>>;
    practitioners: z.ZodArray<z.ZodObject<{
        ref: z.ZodDiscriminatedUnion<[z.ZodObject<{
            kind: z.ZodLiteral<"existing">;
            id: z.ZodString;
        }, z.core.$strip>, z.ZodObject<{
            kind: z.ZodLiteral<"new">;
            draftId: z.ZodString;
        }, z.core.$strip>], "kind">;
        displayName: z.ZodString;
        bio: z.ZodNullable<z.ZodString>;
        timezone: z.ZodString;
        colorHex: z.ZodNullable<z.ZodString>;
    }, z.core.$strip>>;
    availability: z.ZodArray<z.ZodObject<{
        kind: z.ZodLiteral<"weekly_windows">;
        resourceRef: z.ZodDiscriminatedUnion<[z.ZodObject<{
            kind: z.ZodLiteral<"existing">;
            id: z.ZodString;
        }, z.core.$strip>, z.ZodObject<{
            kind: z.ZodLiteral<"new">;
            draftId: z.ZodString;
        }, z.core.$strip>], "kind">;
        serviceRef: z.ZodNullable<z.ZodDiscriminatedUnion<[z.ZodObject<{
            kind: z.ZodLiteral<"existing">;
            id: z.ZodString;
        }, z.core.$strip>, z.ZodObject<{
            kind: z.ZodLiteral<"new">;
            draftId: z.ZodString;
        }, z.core.$strip>], "kind">>;
        windows: z.ZodArray<z.ZodObject<{
            weekday: z.ZodNumber;
            startTime: z.ZodString;
            endTime: z.ZodString;
        }, z.core.$strip>>;
    }, z.core.$strip>>;
    bookingNotice: z.ZodObject<{
        minLeadMinutes: z.ZodNumber;
        maxBookingNoticeMinutes: z.ZodNumber;
    }, z.core.$strip>;
}, z.core.$strip>;
export type ApplyAppointmentSetupRequest = z.infer<typeof applyAppointmentSetupRequestSchema>;
export type AppointmentSetupAvailabilityWindowInvalidReason = "weekday_out_of_range" | "time_format_invalid" | "end_time_not_after_start_time" | "overlapping_windows";
export type AppointmentSetupPlanIssue = Readonly<{
    kind: "duplicate_service_ref";
    refKey: string;
}> | Readonly<{
    kind: "duplicate_practitioner_ref";
    refKey: string;
}> | Readonly<{
    kind: "duplicate_venue_draft";
    draftId: string;
}> | Readonly<{
    kind: "selected_practitioner_missing";
    serviceRefKey: string;
    resourceRefKey: string;
}> | Readonly<{
    kind: "selected_practitioners_empty";
    serviceRefKey: string;
}> | Readonly<{
    kind: "availability_practitioner_missing";
    resourceRefKey: string;
}> | Readonly<{
    kind: "availability_service_missing";
    serviceRefKey: string;
}> | Readonly<{
    kind: "availability_window_invalid";
    resourceRefKey: string;
    reason: AppointmentSetupAvailabilityWindowInvalidReason;
}>;
export type AppointmentSetupDraftMapping = Readonly<{
    draftId: string;
    id: string;
}>;
export type ApplyAppointmentSetupResponse = AppointmentSetupResponse & Readonly<{
    mappings: Readonly<{
        services: readonly AppointmentSetupDraftMapping[];
        practitioners: readonly AppointmentSetupDraftMapping[];
        venues: readonly AppointmentSetupDraftMapping[];
    }>;
    projectedReadiness: AppointmentSetupReadiness;
}>;
export declare function getAppointmentSetupRequest(apiClient: ApiClient, siteId: string, options?: RequestInit): Promise<AppointmentSetupResponse>;
export declare function applyAppointmentSetupRequest(apiClient: ApiClient, siteId: string, payload: ApplyAppointmentSetupRequest, options?: RequestInit): Promise<ApplyAppointmentSetupResponse>;
