{"version":3,"file":"Toast.types.mjs","sourceRoot":"","sources":["../../../src/components/Toast/Toast.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ToastPropsShared } from '@metamask/design-system-shared';\n\nimport type { BannerBaseProps } from '../BannerBase';\nimport type { IconProps } from '../Icon';\n\ntype ToastCloseButtonProps = Omit<\n  NonNullable<BannerBaseProps['closeButtonProps']>,\n  'onClick'\n>;\n\n/**\n * Props for the Toast visual component.\n * Extends the platform BannerBase props with severity and an icon override.\n * `onClose` is simplified to `() => void` (no MouseEvent) to align with the\n * React Native API and the imperative `toast()` pattern.\n */\nexport type ToastProps = Omit<BannerBaseProps, 'closeButtonProps' | 'onClose'> &\n  ToastPropsShared & {\n    /**\n     * Optional handler called when the close button is pressed.\n     * When provided, a close button is shown.\n     */\n    onClose?: () => void;\n    /**\n     * Optional props passed to the severity `Icon`.\n     * Only used when `severity` is not `Default` and `startAccessory` is not provided.\n     */\n    iconProps?: Omit<IconProps, 'name' | 'color'>;\n    /**\n     * Optional props for the close `ButtonIcon`.\n     * `ariaLabel` defaults to `'Close toast'`.\n     */\n    closeButtonProps?: ToastCloseButtonProps;\n    /**\n     * Optional test identifier forwarded to the root Toast element.\n     */\n    'data-testid'?: string;\n  };\n\n/**\n * Options passed to the imperative `toast(...)` API.\n */\nexport type ToastOptions = ToastProps & {\n  /**\n   * When true the toast stays visible until explicitly dismissed.\n   * Defaults to false.\n   */\n  hasNoTimeout?: boolean;\n  /**\n   * When `false`, hides the close button on the imperative toast.\n   * Auto-dismiss and `toast.dismiss()` still work.\n   * Defaults to `true`.\n   */\n  showCloseButton?: boolean;\n};\n\n/**\n * Imperative handle exposed by `<Toaster ref={...} />`.\n */\nexport type ToasterRef = {\n  showToast: (options: ToastOptions) => void;\n  closeToast: () => void;\n};\n\n/**\n * Props for the `<Toaster />` container component.\n */\nexport type ToasterProps = {\n  /**\n   * Optional extra CSS classes applied to the fixed outer container.\n   */\n  className?: string;\n} & Omit<React.HTMLAttributes<HTMLDivElement>, 'style'>;\n"]}