{"version":3,"file":"notification.mjs","sources":["../../../../../packages/components/notification/src/notification.ts"],"sourcesContent":["import type { VNode, ExtractPropTypes, PropType } from 'vue'\n\nexport const notificationTypes = [\n  'success',\n  'info',\n  'warning',\n  'error'\n] as const\n\nexport const notificationProps = {\n  customClass: {\n    type: String,\n    default: ''\n  },\n  dangerouslyUseHTMLString: {\n    type: Boolean,\n    default: false\n  },\n  duration: {\n    type: Number,\n    default: 4500\n  },\n  icon: {\n    type: [String, Object] as PropType<string | Comment>,\n    default: ''\n  },\n  id: {\n    type: String,\n    default: ''\n  },\n  message: {\n    type: [String, Object] as PropType<string | VNode>,\n    default: ''\n  },\n  offset: {\n    type: Number,\n    default: 0\n  },\n  onClick: {\n    type: Function as PropType<() => void>,\n    default: () => undefined\n  },\n  onClose: {\n    type: Function as PropType<() => void>,\n    required: true\n  },\n  position: {\n    type: String,\n    values: ['top-right', 'top-left', 'bottom-right', 'bottom-left'],\n    default: 'top-right'\n  },\n  showClose: {\n    type: Boolean,\n    default: true\n  },\n  title: {\n    type: String,\n    default: ''\n  },\n  type: {\n    type: String,\n    values: [...notificationTypes, ''],\n    default: ''\n  },\n  zIndex: {\n    type: Number,\n    default: 0\n  }\n}\nexport type NotificationProps = ExtractPropTypes<typeof notificationProps>\n\nexport const notificationEmits = {\n  destroy: () => true\n}\nexport type NotificationEmits = typeof notificationEmits\n\nexport type NotificationOptions = Omit<NotificationProps, 'id'> & {\n  appendTo?: HTMLElement | string\n}\nexport type NotificationOptionsTyped = Omit<NotificationOptions, 'type'>\n\nexport interface NotificationHandle {\n  close: () => void\n}\n\nexport type NotificationParams = Partial<NotificationOptions> | string | VNode\nexport type NotificationParamsTyped =\n  | Partial<NotificationOptionsTyped>\n  | string\n  | VNode\n\nexport type NotifyFn = ((\n  options?: NotificationParams\n) => NotificationHandle) & { closeAll: () => void }\n\nexport type NotifyTypedFn = (\n  options?: NotificationParamsTyped\n) => NotificationHandle\n\nexport interface Notify extends NotifyFn {\n  success: NotifyTypedFn\n  warning: NotifyTypedFn\n  error: NotifyTypedFn\n  info: NotifyTypedFn\n}\n\nexport interface NotificationQueueItem {\n  vm: VNode\n}\n\nexport type NotificationQueue = NotificationQueueItem[]\n"],"names":[],"mappings":"AAEO,MAAM,iBAAoB,GAAA;AAAA,EAC/B,SAAA;AAAA,EACA,MAAA;AAAA,EACA,SAAA;AAAA,EACA,OAAA;AACF,EAAA;AAEO,MAAM,iBAAoB,GAAA;AAAA,EAC/B,WAAa,EAAA;AAAA,IACX,IAAM,EAAA,MAAA;AAAA,IACN,OAAS,EAAA,EAAA;AAAA,GACX;AAAA,EACA,wBAA0B,EAAA;AAAA,IACxB,IAAM,EAAA,OAAA;AAAA,IACN,OAAS,EAAA,KAAA;AAAA,GACX;AAAA,EACA,QAAU,EAAA;AAAA,IACR,IAAM,EAAA,MAAA;AAAA,IACN,OAAS,EAAA,IAAA;AAAA,GACX;AAAA,EACA,IAAM,EAAA;AAAA,IACJ,IAAA,EAAM,CAAC,MAAA,EAAQ,MAAM,CAAA;AAAA,IACrB,OAAS,EAAA,EAAA;AAAA,GACX;AAAA,EACA,EAAI,EAAA;AAAA,IACF,IAAM,EAAA,MAAA;AAAA,IACN,OAAS,EAAA,EAAA;AAAA,GACX;AAAA,EACA,OAAS,EAAA;AAAA,IACP,IAAA,EAAM,CAAC,MAAA,EAAQ,MAAM,CAAA;AAAA,IACrB,OAAS,EAAA,EAAA;AAAA,GACX;AAAA,EACA,MAAQ,EAAA;AAAA,IACN,IAAM,EAAA,MAAA;AAAA,IACN,OAAS,EAAA,CAAA;AAAA,GACX;AAAA,EACA,OAAS,EAAA;AAAA,IACP,IAAM,EAAA,QAAA;AAAA,IACN,SAAS,MAAM,KAAA,CAAA;AAAA,GACjB;AAAA,EACA,OAAS,EAAA;AAAA,IACP,IAAM,EAAA,QAAA;AAAA,IACN,QAAU,EAAA,IAAA;AAAA,GACZ;AAAA,EACA,QAAU,EAAA;AAAA,IACR,IAAM,EAAA,MAAA;AAAA,IACN,M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