// Global toast handler for use outside React components (like in axios interceptor)
let globalShowGuestWarning: (() => void) | null = null;

export const setGlobalToastHandler = (handler: () => void) => {
    globalShowGuestWarning = handler;
};

export const triggerGuestWarning = () => {
    if (globalShowGuestWarning) {
        globalShowGuestWarning();
    }
};
