import type { Observable } from 'rxjs';

/**
 * Behavior-only authentication contract. Token state (accessToken,
 * refreshToken, authenticated, credentials I/O) lives in `TokenStore`.
 * Concrete adapters inject both `TokenStore` and any required transport
 * (e.g. Apollo) and delegate state mutations to the store.
 */
export abstract class AuthenticationService {
  abstract signIn(credentials: { email: string; password: string }): Observable<boolean>;
  abstract signInUsingRefreshToken(): Observable<boolean>;
  abstract signOut(): Observable<boolean>;
  abstract signUp(user: { name: string; email: string; password: string }): Observable<boolean>;

  abstract forgotPassword(email: string, origin?: string): Observable<boolean>;
  abstract resetPassword(password: string, token: string): Observable<boolean>;

  abstract check(): Observable<boolean>;
}
