/**
 * Toast type definitions
 * @countermeasure/web-components/components/toast
 */

export type ToastLevel = 'success' | 'error' | 'warning' | 'info'

export type ToastPosition = 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left'

export interface ToastConfig {
  /**
   * Corner of the viewport where toasts appear.
   * @default 'top-right'
   */
  position?: ToastPosition
  /**
   * Maximum number of toasts visible at once. Older toasts dismiss when exceeded.
   * @default 3
   */
  maxVisible?: number
  /**
   * Default lifetime in milliseconds before a toast auto-dismisses.
   * @default 5000
   */
  defaultDuration?: number
}

export interface ToastOptions {
  /**
   * When `true` the toast will not auto-dismiss.
   * @default false
   */
  persistent?: boolean
  /** Optional id used to deduplicate or programmatically dismiss the toast. */
  id?: string
  /** Override the default lifetime in milliseconds. */
  duration?: number
}
