import { Component, OnInit } from '@angular/core';
import { PluginsComponentsRegistryService } from '@shared/plugins/plugins-components-registry.service';
import {
  TicketsPluginNotificationsComponent
} from '../plugins/tickets/tickets-plugin-notifications/tickets-plugin-notifications.component';
import {
  DomainsDashboardServicesRowsComponent
} from '../plugins/domains/domains-dashboard-services-rows/domains-dashboard-services-rows.component';
import {
  GoogleAuthenticatorDetailsTabComponent
} from '@shared/plugins/common-tabs/google-authenticator-details-tab/google-authenticator-details-tab.component';
import {
  GoogleAuthenticatorConfirmFormComponent
} from '@shared/plugins/common-tabs/google-authenticator-confirm-form/google-authenticator-confirm-form.component';
import {
  SmsAuthenticatorDetailsTabComponent
} from '@shared/plugins/common-tabs/sms-authenticator-details-tab/sms-authenticator-details-tab.component';
import {
  SmsAuthenticatorConfirmFormComponent
} from '@shared/plugins/common-tabs/sms-authenticator-confirm-form/sms-authenticator-confirm-form.component';
import {
  DomainTransferFormComponent
} from '@shared/plugins/common-tabs/domains/domain-transfer-form/domain-transfer-form.component';
import {
  DomainRegisterFormComponent
} from '@shared/plugins/common-tabs/domains/domain-register-form/domain-register-form.component';
import {
  SelectExistingDomainComponent
} from '../plugins/domains/select-existing-domain/select-existing-domain.component';
import {
  OrderProductComponent as CpanelOrderProductComponent
} from '../plugins/cpanel/order-product/order-product.component';
import {
  OrderProductComponent as DirectAdminOrderProductComponent
} from '../plugins/directadmin/order-product/order-product.component';

import {
  ServiceDetailsComponent as DirectAdminServiceDetailsComponent
} from '../plugins/directadmin/service-details/service-details.component';
import { DomainsSelectDomainComponent } from '@shared/plugins/common-tabs/domains/domains-select-domain/domains-select-domain.component';
import {
  DomainDetailsOverviewComponent
} from '@shared/plugins/common-tabs/domains/domain-details-overview/domain-details-overview.component';
import {
  DomainDetailsNameserversComponent
} from '@shared/plugins/common-tabs/domains/domain-details-nameservers/domain-details-nameservers.component';
import {
  DomainDetailsWhoisInformationComponent
} from '../plugins/domains/tabs/domain-details-whois-information/domain-details-whois-information.component';

@Component({
  selector: 'app-enduser',
  templateUrl: './enduser.component.html',
  styleUrls: ['./enduser.component.scss']
})
export class EnduserComponent implements OnInit {

  constructor(private pluginsComponentsRegistryService: PluginsComponentsRegistryService) {
    pluginsComponentsRegistryService.registerComponent(
      'tickets', 'enduser', 'PluginNotifications', TicketsPluginNotificationsComponent,
    );
    pluginsComponentsRegistryService.registerComponent(
      'domains', 'enduser', 'DashboardServicesRows', DomainsDashboardServicesRowsComponent,
    );
    pluginsComponentsRegistryService.registerComponent(
      'domains', 'enduser', 'SelectDomain', DomainsSelectDomainComponent,
    );
    pluginsComponentsRegistryService.registerComponent(
      'domains', 'enduser', 'TransferDomainForm', DomainTransferFormComponent,
    );
    pluginsComponentsRegistryService.registerComponent(
      'domains', 'enduser', 'RegisterDomainForm', DomainRegisterFormComponent,
    );
    pluginsComponentsRegistryService.registerComponent(
      'domains', 'enduser', 'SelectExistingDomain', SelectExistingDomainComponent,
    );
    pluginsComponentsRegistryService.registerComponent(
      'google-authenticator', 'enduser', 'GoogleAuthenticatorDetailsTabComponent', GoogleAuthenticatorDetailsTabComponent,
    );
    pluginsComponentsRegistryService.registerComponent(
      'google-authenticator', 'enduser', 'GoogleAuthenticatorConfirmFormComponent', GoogleAuthenticatorConfirmFormComponent,
    );
    pluginsComponentsRegistryService.registerComponent(
      'sms-authenticator', 'enduser', 'SmsAuthenticatorDetailsTabComponent', SmsAuthenticatorDetailsTabComponent,
    );
    pluginsComponentsRegistryService.registerComponent(
      'sms-authenticator', 'enduser', 'SmsAuthenticatorConfirmFormComponent', SmsAuthenticatorConfirmFormComponent,
    );
    pluginsComponentsRegistryService.registerComponent(
      'cpanel', 'enduser', 'OrderProduct', CpanelOrderProductComponent,
    );
    pluginsComponentsRegistryService.registerComponent(
      'cpanel', 'enduser', 'EditCartItem', CpanelOrderProductComponent,
    );
    pluginsComponentsRegistryService.registerComponent(
      'directadmin', 'enduser', 'OrderProduct', DirectAdminOrderProductComponent,
    );
    pluginsComponentsRegistryService.registerComponent(
      'directadmin', 'enduser', 'EditCartItem', DirectAdminOrderProductComponent,
    );
    pluginsComponentsRegistryService.registerComponent(
      'directadmin', 'enduser', 'ServiceDetails', DirectAdminServiceDetailsComponent,
    );

    pluginsComponentsRegistryService.registerServiceTab(
      'domains', 'enduser', 'overview', $localize`Overview`, DomainDetailsOverviewComponent,
    )
    pluginsComponentsRegistryService.registerServiceTab(
      'domains', 'enduser', 'nameservers', $localize`Nameservers`, DomainDetailsNameserversComponent,
    )
    pluginsComponentsRegistryService.registerServiceTab(
      'domains', 'enduser', 'whois-information', $localize`Whois information`, DomainDetailsWhoisInformationComponent,
    )
  }

  ngOnInit(): void {
  }

}
