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 WFourEntity extends WageFormEntity {
  const WFourEntity({
    required super.isSigned,
    required super.isSubmitted,
    required this.firstName,
    required this.lastName,
    required this.middleName,
    required this.address,
    required this.city,
    required this.state,
    required this.zipCode,
    required this.socialNumber,
  });

  const WFourEntity.empty({
    super.isSigned = false,
    super.isSubmitted = false,
    this.firstName = '',
    this.lastName = '',
    this.middleName = '',
    this.address = '',
    this.city = '',
    this.state = '',
    this.zipCode = '',
    this.socialNumber = '',
  });

  final String firstName;
  final String lastName;
  final String middleName;
  final String address;
  final String city;
  final String state;
  final String zipCode;
  final String socialNumber;

  @override
  String get name => 'W-4';

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

  WFourEntity copyWith({
    bool? isSigned,
    bool? isSubmitted,
    String? firstName,
    String? middleName,
    String? lastName,
    String? address,
    String? city,
    String? state,
    String? zipCode,
    String? socialNumber,
  }) {
    return WFourEntity(
      isSigned: isSigned ?? this.isSigned,
      isSubmitted: isSubmitted ?? this.isSubmitted,
      firstName: firstName ?? this.firstName,
      middleName: middleName ?? this.middleName,
      lastName: lastName ?? this.lastName,
      address: address ?? this.address,
      city: city ?? this.city,
      state: state ?? this.state,
      zipCode: zipCode ?? this.zipCode,
      socialNumber: socialNumber ?? this.socialNumber,
    );
  }
}
