import { Component, OnInit } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
import { BaseForm } from '@core/base/base-form';
import {
  FormGroup,
  UntypedFormControl,
  UntypedFormGroup,
  Validators,
} from '@angular/forms';

@Component({
  selector: 'app-type-header',
  templateUrl: './type-header.component.html',
  styleUrls: ['./type-header.component.scss'],
})
export class TypeHeaderComponent {
  constructor(private readonly route: ActivatedRoute) {}

  typeName!: string;

  ngOnInit(): void {
    this.route.queryParams.pipe().subscribe((res) => {
      if (+res['type'] === 3) {
        this.typeName = 'Business';
      } else if (+res['type'] === 2) {
        this.typeName = 'Contractor';
      } else {
        this.typeName = 'Employee';
      }
    });
  }
}
