{"version":3,"file":"onMessageDisplayed.mjs","sources":["../../../../../../src/inAppMessaging/providers/pinpoint/apis/onMessageDisplayed.ts"],"sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { addEventListener } from '../../../../eventListeners';\nimport { assertIsInitialized } from '../../../utils';\n/**\n * Registers a callback that will be invoked on `messageDisplayed` events.\n *\n * @deprecated AWS will end support for Amazon Pinpoint on October 30, 2026.\n *\n * @param {OnMessageDisplayedInput} input - The input object that holds the callback handler.\n * @throws validation: {@link InAppMessagingValidationErrorCode} - Thrown when the provided parameters or library\n * configuration is incorrect, or if In App messaging hasn't been initialized.\n * @returns {OnMessageDisplayedOutput} - An object that holds a remove method to stop listening to events.\n * @example\n * ```ts\n * onMessageDisplayed((message) => {\n *   // use the message\n * \t console.log(message.id);\n * });\n * ```\n */\nexport function onMessageDisplayed(input) {\n    assertIsInitialized();\n    return addEventListener('messageDisplayed', input);\n}\n"],"names":[],"mappings":";;;AAAA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,kBAAkB,CAAC,KAAK,EAAE;AAC1C,IAAI,mBAAmB,EAAE;AACzB,IAAI,OAAO,gBAAgB,CAAC,kBAAkB,EAAE,KAAK,CAAC;AACtD;;;;"}