import 'package:injectable/injectable.dart';
import 'package:krow/features/rate_staff/data/rating_staff_provider.dart';
import 'package:krow/features/rate_staff/data/rating_staff_repository.dart';

@Singleton(as: RatingStaffRepository)
class RatingStaffRepositoryImpl implements RatingStaffRepository {
  RatingStaffRepositoryImpl({
    required ClientProfileApiProvider apiProvider,
  }) : _apiProvider = apiProvider;

  final ClientProfileApiProvider _apiProvider;

  @override
  Future<void> rateStaff(
      {required String positionId,
      required int rating,
      String? reason,
      String? details,
      bool isBlocked = false,
      bool isFavorite = false}) {
    return _apiProvider.updateStaffRating(
      positionId: positionId,
      rating: rating,
      reason: reason,
      details: details,
      isBlocked: isBlocked,
      isFavorite: isFavorite,
    );
  }
}
