import 'package:equatable/equatable.dart';

/// Base class for all Personal Info events.
abstract class PersonalInfoEvent extends Equatable {
  const PersonalInfoEvent();

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

/// Event to load personal information.
class PersonalInfoLoadRequested extends PersonalInfoEvent {
  const PersonalInfoLoadRequested();
}

/// Event to update a field value.
class PersonalInfoFieldChanged extends PersonalInfoEvent {
  final String field;
  final dynamic value;

  const PersonalInfoFieldChanged({
    required this.field,
    required this.value,
  });

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

/// Event to submit the form.
class PersonalInfoFormSubmitted extends PersonalInfoEvent {
  const PersonalInfoFormSubmitted();
}

/// Event when an address is selected from autocomplete.
class PersonalInfoAddressSelected extends PersonalInfoEvent {
  final String address;
  const PersonalInfoAddressSelected(this.address);
  
  @override
  List<Object?> get props => [address];
}
