import { IOption } from "../../../common/domain/entities/option";
import { ProfileDataSource } from "../../domain/datasources/profile_datasource";
import { ProfileRepository } from "../../domain/repositories/profile_repository";

export class ProfileRepositoryImpl implements ProfileRepository {
    constructor(
        private dataSource: ProfileDataSource
    ){}
    getUserInterests(): Promise<IOption[]>{
        return this.dataSource.getUserInterests();
    }
    async changePassword (oldPassword: string, newPassword: string): Promise<void> {
        return this.dataSource.changePassword(oldPassword, newPassword);
    };
    async getInterests() {
        return this.dataSource.getInterests();
    }
    async saveInterests(options: IOption[]) {
        return this.dataSource.saveInterests(options);
    }
    async setUpProfile(birthdate: string, interests: IOption[]) {
        return this.dataSource.setUpProfile(birthdate, interests);
    }
}