1{"version":3,"file":"presentNotificationAsync.js","sourceRoot":"","sources":["../src/presentNotificationAsync.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,EAAE,IAAI,MAAM,EAAE,MAAM,MAAM,CAAC;AAEpC,OAAO,qBAAqB,MAAM,+BAA+B,CAAC;AAGlE,IAAI,mBAAmB,GAAG,KAAK,CAAC;AAEhC;;;GAGG;AACH,MAAM,CAAC,OAAO,CAAC,KAAK,UAAU,wBAAwB,CACpD,OAAiC,EACjC,aAAqB,MAAM,EAAE;IAE7B,IAAI,OAAO,IAAI,CAAC,mBAAmB,EAAE;QACnC,OAAO,CAAC,IAAI,CACV,qMAAqM,CACtM,CAAC;QACF,mBAAmB,GAAG,IAAI,CAAC;KAC5B;IAED,IAAI,CAAC,qBAAqB,CAAC,wBAAwB,EAAE;QACnD,MAAM,IAAI,mBAAmB,CAAC,eAAe,EAAE,0BAA0B,CAAC,CAAC;KAC5E;IAED,OAAO,MAAM,qBAAqB,CAAC,wBAAwB,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;AACnF,CAAC","sourcesContent":["import { UnavailabilityError } from '@unimodules/core';\nimport { v4 as uuidv4 } from 'uuid';\n\nimport NotificationPresenter from './NotificationPresenterModule';\nimport { NotificationContentInput } from './Notifications.types';\n\nlet warningMessageShown = false;\n\n/**\n * @deprecated Use `scheduleNotificationAsync` with an explicit notification handler.\n * [Read more](https://expo.fyi/presenting-notifications-deprecated).\n */\nexport default async function presentNotificationAsync(\n  content: NotificationContentInput,\n  identifier: string = uuidv4()\n): Promise<string> {\n  if (__DEV__ && !warningMessageShown) {\n    console.warn(\n      '`presentNotificationAsync` has been deprecated in favor of using `scheduleNotificationAsync` + an explicit notification handler. Read more at https://expo.fyi/presenting-notifications-deprecated.'\n    );\n    warningMessageShown = true;\n  }\n\n  if (!NotificationPresenter.presentNotificationAsync) {\n    throw new UnavailabilityError('Notifications', 'presentNotificationAsync');\n  }\n\n  return await NotificationPresenter.presentNotificationAsync(identifier, content);\n}\n"]}