import { Injectable } from '@angular/core';

@Injectable({ providedIn: 'root' })
export class AuthService {
    private loggedIn = false;

    isLoggedIn(): boolean {
        return this.loggedIn;
    }

    login(email: string, password: string): boolean {
        if (email === 'admin@example.com' && password === 'password') {
            this.loggedIn = true;
            return true;
        }
        return false;
    }

    logout(): void {
        this.loggedIn = false;
    }
}
