import 'package:equatable/equatable.dart';
import '../../models/account.dart';
import '../../models/group_member.dart';

abstract class AccountEvent extends Equatable {
  const AccountEvent();

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

class LoadAccountsByUserId extends AccountEvent {
  final String userId;

  const LoadAccountsByUserId(this.userId);

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

class LoadAccountsByTrip extends AccountEvent {
  final String tripId;

  const LoadAccountsByTrip(this.tripId);

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

class CreateAccount extends AccountEvent {
  final Account account;

  const CreateAccount(this.account);

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

class UpdateAccount extends AccountEvent {
  final String accountId;
  final Account account;

  const UpdateAccount({
    required this.accountId,
    required this.account,
  });

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

class CreateAccountWithMembers extends AccountEvent {
  final Account account;
  final List<GroupMember> members;

  const CreateAccountWithMembers({
    required this.account,
    required this.members,
  });

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