1import { UnavailabilityError, uuid } from 'expo-modules-core';
2import NotificationPresenter from './NotificationPresenterModule';
3let warningMessageShown = false;
4/**
5 * Schedules a notification for immediate trigger.
6 * @param content An object representing the notification content.
7 * @param identifier
8 * @return It returns a Promise resolving with the notification's identifier once the notification is successfully scheduled for immediate display.
9 * @header schedule
10 * @deprecated This method has been deprecated in favor of using an explicit `NotificationHandler` and the [`scheduleNotificationAsync`](#notificationsschedulenotificationasyncrequest) method. More information can be found in our [FYI document](https://expo.fyi/presenting-notifications-deprecated).
11 */
12export default async function presentNotificationAsync(content, identifier = uuid.v4()) {
13    if (__DEV__ && !warningMessageShown) {
14        console.warn('`presentNotificationAsync` has been deprecated in favor of using `scheduleNotificationAsync` + an explicit notification handler. Read more at https://expo.fyi/presenting-notifications-deprecated.');
15        warningMessageShown = true;
16    }
17    if (!NotificationPresenter.presentNotificationAsync) {
18        throw new UnavailabilityError('Notifications', 'presentNotificationAsync');
19    }
20    return await NotificationPresenter.presentNotificationAsync(identifier, content);
21}
22//# sourceMappingURL=presentNotificationAsync.js.map