import { Notification } from '@arco-design/web-vue' // Frozen API (Phase 005). Mirrors the Naive `useNotification` option names // (title/description) and maps description onto Arco's `content`. // Extend this adapter instead of importing Arco's Notification directly in views. export interface AppNotificationOptions { title?: string description?: string duration?: number } function normalize(options: AppNotificationOptions) { return { title: options.title, // NotificationConfig.content is required; fall back to the title so a // bare title still renders. content: options.description ?? options.title ?? '', duration: options.duration, } } export function useNotification() { return { success: (options: AppNotificationOptions) => Notification.success(normalize(options)), error: (options: AppNotificationOptions) => Notification.error(normalize(options)), warning: (options: AppNotificationOptions) => Notification.warning(normalize(options)), info: (options: AppNotificationOptions) => Notification.info(normalize(options)), } } export type AppNotification = ReturnType