import 'package:flutter/material.dart';
import 'package:krow/core/application/routing/routes.gr.dart';
import 'package:krow/features/profile/wages_forms/domain/entities/edd_form_entity.dart';
import 'package:krow/features/profile/wages_forms/domain/entities/i_nine_entity.dart';
import 'package:krow/features/profile/wages_forms/domain/entities/offer_letter_entity.dart';
import 'package:krow/features/profile/wages_forms/domain/entities/w_four_entity.dart';
import 'package:krow/features/profile/wages_forms/domain/utils/wage_form_visitor.dart';
import 'package:krow/features/profile/wages_forms/presentation/widgets/form_item_widget.dart';

class RoutingWageFormVisitor implements WageFormVisitor<Widget> {
  const RoutingWageFormVisitor();

  @override
  Widget visitEddForm(EddFormEntity entity) {
    return FormItemWidget(
      formRoute: const EddFormRoute(),
      wageForm: entity,
      label: 'EDD',
    );
  }

  @override
  Widget visitINineForm(INineEntity entity) {
    return FormItemWidget(
      formRoute: const INineFormRoute(),
      wageForm: entity,
      label: 'I-9',
    );
  }

  @override
  Widget visitOfferLetterFrom(OfferLetterEntity entity) {
    return FormItemWidget(
      formRoute: const OfferLetterFormRoute(),
      wageForm: entity,
      label: 'Offer Letter & Agreement',
    );
  }

  @override
  Widget visitWFourForm(WFourEntity entity) {
    return FormItemWidget(
      formRoute: const WFourFormRoute(),
      wageForm: entity,
      label: 'W-4',
    );
  }
}
