import { vi } from 'vitest'

// Mock Naive UI composables used by useToast and components
// Keep all component exports via importOriginal so shallowMount can resolve them
vi.mock('naive-ui', async (importOriginal) => {
  const mod: Record<string, unknown> = await importOriginal()
  return {
    ...mod,
    useMessage: () => ({
      success: vi.fn(),
      error: vi.fn(),
      warning: vi.fn(),
      info: vi.fn(),
    }),
    useDialog: () => ({
      success: vi.fn(),
      error: vi.fn(),
      warning: vi.fn(),
      info: vi.fn(),
    }),
    create: vi.fn(),
  }
})
