import { CSSProperties, MaybeRef, TransitionGroupProps } from 'vue'; import { VueNode } from '@v-c/util/dist/type'; import { ClosableType, Key, NotificationListConfig, Placement, StackConfig } from '../interface'; import { ComponentsType } from '../Notification'; import { NotificationClassNames, NotificationStyles } from '../NotificationList'; import { NotificationsProps } from '../Notifications'; type OptionalConfig = Partial; export interface NotificationConfig { prefixCls?: string; /** Customize container. It will repeat call which means you should return same container element. */ getContainer?: () => HTMLElement | ShadowRoot; motion?: TransitionGroupProps | ((placement: Placement) => TransitionGroupProps); closable?: ClosableType; maxCount?: number; duration?: number | false | null; showProgress?: boolean; pauseOnHover?: boolean; placement?: Placement; classNames?: NotificationClassNames; styles?: NotificationStyles; components?: ComponentsType; /** @private. Config for notification holder style. Safe to remove if refactor */ className?: (placement: Placement) => string; /** @private. Config for notification holder style. Safe to remove if refactor */ style?: (placement: Placement) => CSSProperties; /** @private Trigger when all the notification closed. */ onAllRemoved?: VoidFunction; stack?: StackConfig; /** @private Slot for style in Notifications */ renderNotifications?: NotificationsProps['renderNotifications']; } export interface NotificationAPI { open: (config: OptionalConfig) => void; close: (key: Key) => void; destroy: () => void; } export default function useNotification(rootConfig?: MaybeRef): [NotificationAPI, () => VueNode]; export {};