import React, { type ReactNode, type CSSProperties } from "react"; import type { FrClassName } from "./fr/generatedFromCss/classNames"; export type AlertProps = { className?: string; id?: string; severity: AlertProps.Severity; /** Default h3 */ as?: `h${2 | 3 | 4 | 5 | 6}`; classes?: Partial>; style?: CSSProperties; /** Display the cross icon (understand isClosableByUser) */ closable?: boolean; /** To provide if you want the Alert to be controlled */ isClosed?: boolean; onClose?: () => void; } & (AlertProps.DefaultSize | AlertProps.Small); export declare namespace AlertProps { export type DefaultSize = { /** Default false */ small?: false; title: NonNullable; description?: NonNullable; }; export type Small = { /** Default false */ small: true; title?: NonNullable; description: NonNullable; }; type ExtractSeverity = FrClassName extends `fr-alert--${infer Severity}` ? Exclude : never; export type Severity = ExtractSeverity; export {}; } /** @see */ export declare const Alert: React.MemoExoticComponent>>; export default Alert; declare const addAlertTranslations: (params: { lang: string; messages: Partial<{ "hide message": string; }>; }) => void; export { addAlertTranslations };