import React from 'react'; import { StyleProp, ViewStyle } from 'react-native'; /** * Options for rendering `AlertComponent`. * * @interface AlertComponentOptions * * **Visibility & Timing:** * @property {boolean} visible Controls whether the alert modal is shown. * @property {number} [duration=4000] Auto-dismiss delay in milliseconds. * * **Content:** * @property {string} message Message text displayed inside the alert. * @property {'success' | 'danger'} [type='success'] Theme style applied to the alert badge. * @property {string} [textColor='black'] Text color override for the message. * * **Behaviour:** * @property {() => void} [onHide] Callback triggered when the alert is dismissed. * * **Appearance:** * @property {StyleProp} [style] Additional styles for the centered container. * * **Advanced Render Overrides:** * @property {(options: { defaultContent: JSX.Element; dimensions: { width: number; height: number } }) => JSX.Element} [renderContent] * Customize the content rendered inside the modal card. * @property {(options: { defaultContainer: JSX.Element; dimensions: { width: number; height: number } }) => JSX.Element} [renderContainer] * Replace the entire modal implementation. */ export interface AlertComponentOptions { visible: boolean; message: string; type?: 'success' | 'danger'; duration?: number; onHide?: () => void; textColor?: string; style?: StyleProp; renderContent?: (options: { defaultContent: JSX.Element; dimensions: { width: number; height: number; }; }) => JSX.Element; renderContainer?: (options: { defaultContainer: JSX.Element; dimensions: { width: number; height: number; }; }) => JSX.Element; } export type AlertComponentType = (options: AlertComponentOptions) => JSX.Element; /** * AlertComponent presents lightweight meeting alerts such as success or error notifications. It supports timed * dismissal, manual close taps, and override hooks for tailoring the rendered modal or its content. * * ### Key Features * - Auto-dismiss after configurable duration (default 4 seconds) * - Success (green) or danger (red) theme styles * - Tap-to-dismiss functionality * - Centered modal overlay with fade animation * - Render overrides for content and container * * ### Behavior * - Automatically hides after `duration` milliseconds * - Calls `onHide` callback on dismiss * - Dismissable by tapping the modal backdrop * * ### Accessibility * - Modal includes transparent backdrop * - Pressable area for dismissal * - Clear visual feedback for success/error states * * @example * ```tsx * // Basic success alert * setShowSuccess(false)} * /> * ``` * * @example * ```tsx * // Danger alert with custom text color * setShowError(false)} * /> * ``` * * @example * ```tsx * // With custom content and icon * ( * * * {defaultContent} * * )} * onHide={() => setShowAlert(false)} * /> * ``` */ declare const AlertComponent: React.FC; export default AlertComponent;