import { Profile, ProfilePaginated } from '@app/domain/profiles/profile.model';
import { of } from 'rxjs';

export const mockProfiles: Profile[] = [
  {
    id: '1',
    created: '2024-01-17T10:00:00Z',
    updated: '2024-01-17T12:00:00Z',
    profession: 'Développeur Web',
    coordonnees: { lat: 0, lon: 0 },
    utilisateur: 'user_abc',
    estVerifier: true,
    secteur: 'Informatique',
    reseaux: JSON.parse('{"linkedin": "https://linkedin.com/in/test"}'),
    bio: 'Passionné de code.',
    cv: 'cv.pdf',
    projets: ['p1', 'p2'],
    apropos: 'Développeur Angular & Node.js',
  },
  {
    id: '2',
    created: '2024-01-18T08:00:00Z',
    updated: '2024-01-18T09:00:00Z',
    profession: 'Designer UI/UX',
    utilisateur: 'user_xyz',
    coordonnees: { lat: 0, lon: 0 },
    estVerifier: false,
    secteur: 'Design',
    reseaux: JSON.parse('{"dribbble": "https://dribbble.com/test"}'),
    bio: 'Créatif et curieux.',
    cv: 'cv2.pdf',
    projets: ['p3'],
    apropos: 'Designer Freelance',
  },
];

export const mockProfilePaginated: ProfilePaginated = {
  page: 1,
  perPage: 10,
  totalPages: 1,
  totalItems: 1,
  items: mockProfiles,
};

export const mockProfileRepo = {
  create: jest.fn().mockReturnValue(of({} as Profile)),
  list: jest.fn().mockReturnValue(of([])),
  getById: jest.fn().mockReturnValue(of({} as Profile)),
  update: jest.fn().mockReturnValue(of({} as Profile)),
  updateCoordinates: jest.fn(),
  updateSettings: jest.fn(),
};
