import 'package:equatable/equatable.dart';
import '../../models/expense.dart';

abstract class ExpenseState extends Equatable {
  const ExpenseState();

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

class ExpenseInitial extends ExpenseState {}

class ExpenseLoading extends ExpenseState {}

class ExpensesLoaded extends ExpenseState {
  final List<Expense> expenses;
  final Map<String, double> exchangeRates;

  const ExpensesLoaded({
    required this.expenses,
    this.exchangeRates = const {'EUR': 1.0, 'USD': 0.85, 'GBP': 1.15},
  });

  @override
  List<Object?> get props => [expenses, exchangeRates];
}

class ExpenseOperationSuccess extends ExpenseState {
  final String message;

  const ExpenseOperationSuccess(this.message);

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

class ExpenseError extends ExpenseState {
  final String message;

  const ExpenseError(this.message);

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