import { BaseAdapter } from '@humand-packages/common';
import { Service } from 'typedi';
import { PortsDI } from '../../../../config/portsDI';
import { FacialRecognitionTimeTrackingConfigPort } from '../../../facialRecognition/business/ports/facialRecognitionTimeTrackingConfigPort';
import { TimeTrackingConfigRepositoryPort } from '../ports/timeTracking/timeTrackingConfigRepositoryPort';

@Service()
export class FacialRecognitionTimeTrackingConfigAdapter extends BaseAdapter implements FacialRecognitionTimeTrackingConfigPort {
    constructor(@PortsDI(TimeTrackingConfigRepositoryPort) private readonly configRepository: TimeTrackingConfigRepositoryPort) {
        super();
    }

    async updateReferenceImage(instanceId: number, userId: number, referenceImage: string): Promise<void> {
        await this.configRepository.updateReferenceImage(instanceId, userId, referenceImage);
    }

    async deleteReferenceImage(instanceId: number, userId: number): Promise<void> {
        await this.configRepository.deleteReferenceImage(instanceId, userId);
    }
}
