part of 'transaction_bloc.dart';

sealed class TransactionEvent extends Equatable {
  const TransactionEvent();

  @override
  List<Object> get props => [];
}

final class TransactionsLoad extends TransactionEvent {
  final List<Transaction> transactions;
  const TransactionsLoad(this.transactions);

  @override
  List<Object> get props => [transactions];
}

final class TransactionDateChange extends TransactionEvent {
  final DateTime? date;
  const TransactionDateChange(this.date);
}

final class TransactionCategoryChange extends TransactionEvent {
  final String category;
  const TransactionCategoryChange(this.category);

  @override
  List<Object> get props => [category];
}

final class TransactionDescriptionChange extends TransactionEvent {
  final String description;
  const TransactionDescriptionChange(this.description);

  @override
  List<Object> get props => [description];
}

final class TransactionAccountChange extends TransactionEvent {
  final String account;
  const TransactionAccountChange(this.account);

  @override
  List<Object> get props => [account];
}

final class TransactionValueChange extends TransactionEvent {
  final String value;
  const TransactionValueChange(this.value);

  @override
  List<Object> get props => [value];
}

final class TransactionAdd extends TransactionEvent {
  const TransactionAdd();
}

final class TransactionOpenAddDialog extends TransactionEvent {
  const TransactionOpenAddDialog();
}

final class TransactionHideAddDialog extends TransactionEvent {
  const TransactionHideAddDialog();
}

final class TransactionSetCurrent extends TransactionEvent {
  final Transaction? transaction;
  const TransactionSetCurrent(this.transaction);
}

final class TransactionDeleteCurrent extends TransactionEvent {
  const TransactionDeleteCurrent();
}

final class TransactionFilterCategory extends TransactionEvent {
  final Category? category;

  const TransactionFilterCategory(this.category);
}