import type { TNotificationMetaOptions, TAddNotificationAction, TNotification } from '@commercetools-frontend/notifications'; import type { TShowNotification } from "../types.js"; type TNotificationHook = (content: Notification, meta?: TNotificationMetaOptions) => TAddNotificationAction; /** * Dispatch a notification. * * @example * const showSuccessNotification = useShowNotification(); * showSuccessNotification({ * domain: NOTIFICATION_DOMAINS.SIDE, * kind: NOTIFICATION_KINDS_SIDE.success, * text: "All good!", * }); */ declare function useShowNotification(): TNotificationHook; /** * Dispatch a notification. * * @deprecated: Avoid passing the notification options here. * Instead define them in the notification function itself. * * @example * Bad: * const showSuccessNotification = useShowNotification({ * domain: NOTIFICATION_DOMAINS.SIDE, * kind: NOTIFICATION_KINDS_SIDE.success, * }); * showSuccessNotification({ * text: "All good!", * }); * * Good: * const showSuccessNotification = useShowNotification(); * showSuccessNotification({ * domain: NOTIFICATION_DOMAINS.SIDE, * kind: NOTIFICATION_KINDS_SIDE.success, * text: "All good!", * }); */ declare function useShowNotification(notificationFragment: Partial): TNotificationHook; export default useShowNotification;