import 'package:krow/features/profile/wages_forms/domain/entities/wage_form_entity.dart';
import 'package:krow/features/profile/wages_forms/domain/utils/wage_form_visitor.dart';

class INineEntity extends WageFormEntity {
  const INineEntity({
    required super.isSigned,
    required super.isSubmitted,
    required this.firstName,
    required this.lastName,
    required this.middleName,
    required this.address,
    required this.aptNumber,
    required this.city,
    required this.state,
    required this.zipCode,
    required this.dateOfBirth,
    required this.socialNumber,
    required this.email,
    required this.phoneNumber,
  });

  const INineEntity.empty({
    super.isSigned = false,
    super.isSubmitted = false,
    this.firstName = '',
    this.lastName = '',
    this.middleName = '',
    this.address = '',
    this.aptNumber,
    this.city = '',
    this.state = '',
    this.zipCode = '',
    this.dateOfBirth,
    this.socialNumber = '',
    this.email = '',
    this.phoneNumber = '+1',
  });

  final String firstName;
  final String lastName;
  final String middleName;
  final String address;
  final int? aptNumber;
  final String city;
  final String state;
  final String zipCode;
  final DateTime? dateOfBirth;
  final String socialNumber;
  final String email;
  final String phoneNumber;

  @override
  String get name => 'I-9';

  @override
  T visit<T>(WageFormVisitor<T> visitor) {
    return visitor.visitINineForm(this);
  }

  INineEntity copyWith({
    bool? isSigned,
    bool? isSubmitted,
    String? firstName,
    String? middleName,
    String? lastName,
    String? address,
    int? aptNumber,
    String? city,
    String? state,
    String? zipCode,
    String? socialNumber,
    DateTime? dateOfBirth,
    String? email,
    String? phoneNumber,
  }) {
    return INineEntity(
      isSigned: isSigned ?? this.isSigned,
      isSubmitted: isSubmitted ?? this.isSubmitted,
      firstName: firstName ?? this.firstName,
      middleName: middleName ?? this.middleName,
      lastName: lastName ?? this.lastName,
      address: address ?? this.address,
      aptNumber: aptNumber ?? this.aptNumber,
      city: city ?? this.city,
      state: state ?? this.state,
      zipCode: zipCode ?? this.zipCode,
      socialNumber: socialNumber ?? this.socialNumber,
      dateOfBirth: dateOfBirth ?? this.dateOfBirth,
      email: email ?? this.email,
      phoneNumber: phoneNumber ?? this.phoneNumber,
    );
  }
}
