import { AuthDataSource } from "../../../domain/datasources/auth_datasource";
import { RegisterInfoEntity } from "../../../domain/entities/register_info";
import { ResetPasswordInfoEntity } from "../../../domain/entities/reset_password_entity";
import { UserInfoEntity } from "../../../domain/entities/user_info_entity";
import { AuthRepository } from "../../../domain/repositories/auth_repository";
export class AuthRepositoryImpl implements AuthRepository {
  constructor(private authDataSource: AuthDataSource) {}
  async verifyAccount(code: string): Promise<void> {
    return await this.authDataSource.verifyAccount(code);
  }
  async resendConfirmationCode(): Promise<void> {
    return await this.authDataSource.resendConfirmationCode();
  }
  async getResetCode(email: string) {
    return this.authDataSource.getResetCode(email);
  }
  async resetPassword(resetInfo: ResetPasswordInfoEntity) {
    return this.authDataSource.resetPassword(resetInfo);
  }
  async login(email: string, password: string) {
    return await this.authDataSource.login(email, password);
  }
  async register(user: RegisterInfoEntity) {
    return await this.authDataSource.register(user);
  }
}
