import 'package:injectable/injectable.dart';
import 'package:krow/features/profile/wages_forms/data/wages_form_api_provider.dart';
import 'package:krow/features/profile/wages_forms/domain/entities/wage_form_entity.dart';
import 'package:krow/features/profile/wages_forms/domain/wages_forms_repository.dart';

@Injectable(as: WagesFormsRepository)
class WagesFormsRepositoryImpl implements WagesFormsRepository {
  WagesFormsRepositoryImpl({required WagesFormApiProvider apiProvider})
      : _apiProvider = apiProvider;

  final WagesFormApiProvider _apiProvider;

  @override
  Future<List<WageFormEntity>> getActualForms() async {
    return _apiProvider.fetchActualForms();
  }

  @override
  Future<void> submitWageForm({required WageFormEntity form}) {
    return _apiProvider.submitWageForm(form);
  }
}
