class OrderFilter {
  final String? selectedDateFilter;
  final String? selectedStatusSort;
  final String? selectedDeliveryType;

  const OrderFilter({
    this.selectedDateFilter,
    this.selectedStatusSort,
    this.selectedDeliveryType,
  });

  OrderFilter copyWith({
    String? selectedStatuses,
    String? selectedSort,
    String? selectedDelivery,
  }) {
    return OrderFilter(
      selectedDateFilter: selectedStatuses ?? selectedDateFilter,
      selectedStatusSort: selectedSort ?? selectedStatusSort,
      selectedDeliveryType: selectedDelivery ?? selectedDeliveryType,
    );
  }

  int get activeCount =>
      (selectedDateFilter != null ? 1 : 0) +
      (selectedStatusSort != null ? 1 : 0) +
      (selectedDeliveryType != null ? 1 : 0);

  bool get hasFilters => activeCount > 0;
}