import 'package:krow_core/core.dart';
import 'package:krow_domain/krow_domain.dart';
import '../arguments/get_shift_details_arguments.dart';
import '../repositories/shifts_repository_interface.dart';

class GetShiftDetailsUseCase extends UseCase<GetShiftDetailsArguments, Shift?> {
  final ShiftsRepositoryInterface repository;

  GetShiftDetailsUseCase(this.repository);

  @override
  Future<Shift?> call(GetShiftDetailsArguments params) {
    return repository.getShiftDetails(
      params.shiftId,
      roleId: params.roleId,
    );
  }
}
