import 'package:injectable/injectable.dart';
import 'package:krow/features/profile/inclusive/data/models/inclusive_info_model.dart';
import 'package:krow/features/profile/inclusive/data/staff_inclusivity_api_provider.dart';
import 'package:krow/features/profile/inclusive/data/staff_inclusivity_repository.dart';

@Injectable(as: StaffInclusivityRepository)
class StaffMobilityRepositoryImpl extends StaffInclusivityRepository {
  StaffMobilityRepositoryImpl({
    required StaffInclusivityApiProvider apiProvider,
  }) : _apiProvider = apiProvider;

  final StaffInclusivityApiProvider _apiProvider;

  @override
  Stream<InclusiveInfoModel> getStaffInclusivityInfo() {
    return _apiProvider.getStaffInclusivityInfoWithCache();
  }

  @override
  Future<InclusiveInfoModel?> updateStaffMobilityInfo(
    InclusiveInfoModel data,
  ) {
    return _apiProvider.updateStaffInclusivityInfoInfo(data);
  }
}
