import type { VNode } from 'vue'

export const NOTIFICATION_TYPES = [
  'neutral',
  'positive',
  'warning',
  'negative',
] as const

export type NotificationType = (typeof NOTIFICATION_TYPES)[number]

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

export interface NotificationOptions {
  type?: NotificationType
  text: string
  title?: string
  duration?: number
  placement?: NotificationPlacement
  id?: string | number
  offset?: number
  onClose?: (vm?: VNode) => void
}

export interface NotificationItem {
  vm: VNode
}

export type NotificationQueue = NotificationItem[]
