// Default empty-quarantine mock for $lib/api/quarantine. The
// dominant shape across 9 test files: empty list + spy mutations.
//
// Usage:
//   vi.mock('$lib/api/quarantine', () => emptyQuarantineMock());
//
// Tests that assert on per-row state (FlagPopover, playlist tests)
// keep custom mocks inline.

import { readable } from 'svelte/store';
import { vi } from 'vitest';

export function emptyQuarantineMock() {
  return {
    flagTrack: vi.fn().mockResolvedValue({}),
    unflagTrack: vi.fn().mockResolvedValue(undefined),
    listMyQuarantine: vi.fn().mockResolvedValue([]),
    createMyQuarantineQuery: () =>
      readable({ data: [], isPending: false, isError: false })
  };
}
