import 'package:pshared/models/recipient/recipient.dart';


List<Recipient> filterRecipients({
  required List<Recipient> recipients,
  String query = '',
}) {
  final filtered = recipients;

  final normalizedQuery = query.trim().toLowerCase();
  if (normalizedQuery.isEmpty) return filtered;

  return filtered.where((r) => r.matchesQuery(normalizedQuery)).toList();
}
