/**
 * @license MIT
 * author: Cube Dev Team
 * @cube-dev/ui-kit v0.98.7
 * Released under the MIT license.
 */

import { useContext, useEffect } from 'react';
import { useEvent } from '../../../../_internal';
import { NotificationsContext } from '../NotificationsContext';
export function useNotificationsObserver(callback) {
    const { addOnDismissListener } = useContext(NotificationsContext) ?? {};
    const callbackEvent = useEvent(callback);
    useEffect(() => addOnDismissListener?.(callbackEvent), [addOnDismissListener]);
}

        