import { vi } from 'vitest';
import '@angular/compiler';
import '@analogjs/vitest-angular/setup-zone';

import {
  BrowserTestingModule,
  platformBrowserTesting,
} from '@angular/platform-browser/testing';
import { getTestBed } from '@angular/core/testing';

// Mock the PurchaseOptionsModalService to prevent import errors from apps layer
vi.mock('apps/isa-app/src/modal/purchase-options/purchase-options-modal.service', () => ({
  PurchaseOptionsModalService: class MockPurchaseOptionsModalService {
    open = vi.fn().mockResolvedValue({
      afterClosed$: {
        subscribe: vi.fn(),
      },
    });
  },
}));

getTestBed().initTestEnvironment(
  BrowserTestingModule,
  platformBrowserTesting(),
);
