import { InjectionToken, inject } from '@angular/core';
import { LocalUserExperienceRepository } from './repositories/local-user-experience.repository';
import { UserExperienceRepository } from './repositories/user-experience.repository';

export const USER_EXPERIENCE_REPOSITORY = new InjectionToken<UserExperienceRepository>('USER_EXPERIENCE_REPOSITORY', {
  providedIn: 'root',
  factory: () => {
    // Sprint 11: guest-first local storage; can be switched to authenticated repository later.
    const localRepository = inject(LocalUserExperienceRepository);
    return localRepository;
  }
});
