import 'package:equatable/equatable.dart';

/// Base class for all profile setup events.
abstract class ProfileSetupEvent extends Equatable {
  const ProfileSetupEvent();

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

/// Event triggered when the full name changes.
class ProfileSetupFullNameChanged extends ProfileSetupEvent {
  /// The new full name value.
  final String fullName;

  /// Creates a [ProfileSetupFullNameChanged] event.
  const ProfileSetupFullNameChanged(this.fullName);

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

/// Event triggered when the bio changes.
class ProfileSetupBioChanged extends ProfileSetupEvent {
  /// The new bio value.
  final String bio;

  /// Creates a [ProfileSetupBioChanged] event.
  const ProfileSetupBioChanged(this.bio);

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

/// Event triggered when the preferred locations change.
class ProfileSetupLocationsChanged extends ProfileSetupEvent {
  /// The new list of locations.
  final List<String> locations;

  /// Creates a [ProfileSetupLocationsChanged] event.
  const ProfileSetupLocationsChanged(this.locations);

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

/// Event triggered when the max distance changes.
class ProfileSetupDistanceChanged extends ProfileSetupEvent {
  /// The new max distance value in miles.
  final double distance;

  /// Creates a [ProfileSetupDistanceChanged] event.
  const ProfileSetupDistanceChanged(this.distance);

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

/// Event triggered when the skills change.
class ProfileSetupSkillsChanged extends ProfileSetupEvent {
  /// The new list of selected skills.
  final List<String> skills;

  /// Creates a [ProfileSetupSkillsChanged] event.
  const ProfileSetupSkillsChanged(this.skills);

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

/// Event triggered when the industries change.
class ProfileSetupIndustriesChanged extends ProfileSetupEvent {
  /// The new list of selected industries.
  final List<String> industries;

  /// Creates a [ProfileSetupIndustriesChanged] event.
  const ProfileSetupIndustriesChanged(this.industries);

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

/// Event triggered when the location query changes.
class ProfileSetupLocationQueryChanged extends ProfileSetupEvent {
  /// The search query.
  final String query;

  /// Creates a [ProfileSetupLocationQueryChanged] event.
  const ProfileSetupLocationQueryChanged(this.query);

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

/// Event triggered when the location suggestions should be cleared.
class ProfileSetupClearLocationSuggestions extends ProfileSetupEvent {
  /// Creates a [ProfileSetupClearLocationSuggestions] event.
  const ProfileSetupClearLocationSuggestions();
}

/// Event triggered when the profile submission is requested.
class ProfileSetupSubmitted extends ProfileSetupEvent {
  /// Creates a [ProfileSetupSubmitted] event.
  const ProfileSetupSubmitted();
}
