import { createContext, useContext } from 'react';

export type LiveSummaryPatch = {
    packageName?: string | null;
    packagePrice?: number | null;
    addonNames?: string[];
    addonsTotal?: number;
    discountTotal?: number;
    discountLabel?: string | null;
};

export const BookingLiveContext = createContext<{
    setPatch: (p: LiveSummaryPatch) => void;
}>({ setPatch: () => {} });

export const useBookingLive = () => useContext(BookingLiveContext);
