import 'package:equatable/equatable.dart';

enum TaxFormType { i9, w4 }

enum TaxFormStatus { notStarted, inProgress, submitted, approved, rejected }

abstract class TaxForm extends Equatable {
  final String id;
  TaxFormType get type;
  final String title;
  final String? subtitle;
  final String? description;
  final TaxFormStatus status;
  final String? staffId;
  final Map<String, dynamic> formData;
  final DateTime? createdAt;
  final DateTime? updatedAt;

  const TaxForm({
    required this.id,
    required this.title,
    this.subtitle,
    this.description,
    this.status = TaxFormStatus.notStarted,
    this.staffId,
    this.formData = const {},
    this.createdAt,
    this.updatedAt,
  });

  @override
  List<Object?> get props => [
        id,
        type,
        title,
        subtitle,
        description,
        status,
        staffId,
        formData,
        createdAt,
        updatedAt,
      ];
}

class I9TaxForm extends TaxForm {
  const I9TaxForm({
    required super.id,
    required super.title,
    super.subtitle,
    super.description,
    super.status,
    super.staffId,
    super.formData,
    super.createdAt,
    super.updatedAt,
  });

  @override
  TaxFormType get type => TaxFormType.i9;
}

class W4TaxForm extends TaxForm {
  const W4TaxForm({
    required super.id,
    required super.title,
    super.subtitle,
    super.description,
    super.status,
    super.staffId,
    super.formData,
    super.createdAt,
    super.updatedAt,
  });

  @override
  TaxFormType get type => TaxFormType.w4;
}
