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

/// Use case for retrieving available shifts with filters.
///
/// This use case delegates to [ShiftsRepositoryInterface].
class GetAvailableShiftsUseCase extends UseCase<GetAvailableShiftsArguments, List<Shift>> {
  final ShiftsRepositoryInterface repository;

  GetAvailableShiftsUseCase(this.repository);

  @override
  Future<List<Shift>> call(GetAvailableShiftsArguments arguments) async {
    return repository.getAvailableShifts(arguments.query, arguments.type);
  }
}

