import { Component, OnInit } from '@angular/core';
import { PluginsComponentsRegistryService } from '@shared/plugins/plugins-components-registry.service';
import {
  ProductSettingsComponent as OpenStackProductSettingsComponent
} from '../../staff/plugins/openstack/product-settings/product-settings.component';
import {
  ProductSettingsComponent as TodoProductSettingsComponent
} from '../../staff/plugins/todo/product-settings/product-settings.component';
import {
  ProductSettingsComponent as CpanelProductSettingsComponent
} from '../../staff/plugins/cpanel/product-settings/product-settings.component';
import {
  ProductSettingsComponent as DirectAdminProductSettingsComponent
} from '../../staff/plugins/directadmin/product-settings/product-settings.component';
import {
  ProductSettingsComponent as CpanelserverProductSettingsComponent
} from '../../staff/plugins/cpanelserver/product-settings/product-settings.component';
import {
  UserDetailsTicketsListComponent
} from '../plugins/tickets/user-details-tickets-list/user-details-tickets-list.component';
import {
  ClientDetailsDomainListComponent
} from '../plugins/domains/client-details-domain-list/client-details-domain-list.component';
import {
  TodoPluginNotificationsComponent
} from '../plugins/todo/todo-plugin-notifications/todo-plugin-notifications.component';
import {
  TicketsSignaturesButtonComponent
} from '../plugins/tickets/tickets-signatures-button/tickets-signatures-button.component';
import {
  ClientDetailsTicketsListComponent
} from '../plugins/tickets/client-details-tickets-list/client-details-tickets-list.component';
import {
  TicketsPluginNotificationsComponent
} from '../plugins/tickets/tickets-plugin-notifications/tickets-plugin-notifications.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 {
  ServiceDetailsComponent as DirectAdminServiceDetailsComponent
} from '../plugins/directadmin/service-details/service-details.component';
import {
  EditTicketNotificationsSettingsBtnComponent
} from '../plugins/tickets/edit-ticket-notifications-settings-btn/edit-ticket-notifications-settings-btn.component';
import {
  UserTicketNotificationsSettingsFormComponent
} from '../plugins/tickets/tabs/user-ticket-notifications-settings-form/user-ticket-notifications-settings-form.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 {
  DomainsSelectDomainComponent
} from '@shared/plugins/common-tabs/domains/domains-select-domain/domains-select-domain.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 {
  DomainDetailsNameserversComponent
} from '@shared/plugins/common-tabs/domains/domain-details-nameservers/domain-details-nameservers.component';
import {
  DomainDetailsOverviewComponent
} from '@shared/plugins/common-tabs/domains/domain-details-overview/domain-details-overview.component';

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

  constructor(pluginsComponentsRegistryService: PluginsComponentsRegistryService) {
    pluginsComponentsRegistryService.registerComponent(
      'cpanel', 'staff', 'ProductSettings', CpanelProductSettingsComponent,
    );
    pluginsComponentsRegistryService.registerComponent(
      'cpanel', 'staff', 'OrderProduct', CpanelOrderProductComponent,
    );
    pluginsComponentsRegistryService.registerComponent(
      'cpanel', 'staff', 'EditCartItem', CpanelOrderProductComponent,
    );
    pluginsComponentsRegistryService.registerComponent(
      'cpanelserver', 'staff', 'ProductSettings', CpanelserverProductSettingsComponent,
    );
    pluginsComponentsRegistryService.registerComponent(
      'tickets', 'staff', 'PluginNotifications', TicketsPluginNotificationsComponent,
    );
    pluginsComponentsRegistryService.registerComponent(
      'tickets', 'staff', 'ClientDetailsTicketsListComponent', ClientDetailsTicketsListComponent,
    );
    pluginsComponentsRegistryService.registerComponent(
      'domains', 'staff', 'ClientDetailsDomainListComponent', ClientDetailsDomainListComponent,
    );
    pluginsComponentsRegistryService.registerComponent(
      'domains', 'staff', 'SelectDomain', DomainsSelectDomainComponent,
    );
    pluginsComponentsRegistryService.registerComponent(
      'domains', 'staff', 'TransferDomainForm', DomainTransferFormComponent,
    );
    pluginsComponentsRegistryService.registerComponent(
      'domains', 'staff', 'RegisterDomainForm', DomainRegisterFormComponent,
    );
    pluginsComponentsRegistryService.registerComponent(
      'tickets', 'staff', 'UserDetailsTicketsListComponent', UserDetailsTicketsListComponent,
    );
    pluginsComponentsRegistryService.registerComponent(
      'todo', 'staff', 'PluginNotifications', TodoPluginNotificationsComponent,
    );
    pluginsComponentsRegistryService.registerComponent(
      'todo', 'staff', 'ProductSettings', TodoProductSettingsComponent,
    );
    pluginsComponentsRegistryService.registerComponent(
      'tickets', 'staff', 'TicketsSignaturesButton', TicketsSignaturesButtonComponent,
    );
    pluginsComponentsRegistryService.registerComponent(
      'tickets', 'staff', 'EditTicketNotificationsSettingsBtn', EditTicketNotificationsSettingsBtnComponent,
    );
    pluginsComponentsRegistryService.registerComponent(
      'tickets', 'staff', 'UserTicketNotificationsSettingsForm', UserTicketNotificationsSettingsFormComponent,
    );
    pluginsComponentsRegistryService.registerComponent(
      'google-authenticator', 'staff', 'GoogleAuthenticatorDetailsTabComponent', GoogleAuthenticatorDetailsTabComponent,
    );
    pluginsComponentsRegistryService.registerComponent(
      'google-authenticator', 'staff', 'GoogleAuthenticatorConfirmFormComponent', GoogleAuthenticatorConfirmFormComponent,
    );
    pluginsComponentsRegistryService.registerComponent(
      'sms-authenticator', 'staff', 'SmsAuthenticatorDetailsTabComponent', SmsAuthenticatorDetailsTabComponent,
    );
    pluginsComponentsRegistryService.registerComponent(
      'sms-authenticator', 'staff', 'SmsAuthenticatorConfirmFormComponent', SmsAuthenticatorConfirmFormComponent,
    );
    pluginsComponentsRegistryService.registerComponent(
      'openstack', 'staff', 'ProductSettings', OpenStackProductSettingsComponent,
    );
    pluginsComponentsRegistryService.registerComponent(
      'directadmin', 'staff', 'ServiceDetails', DirectAdminServiceDetailsComponent,
    );
    pluginsComponentsRegistryService.registerComponent(
      'directadmin', 'staff', 'ProductSettings', DirectAdminProductSettingsComponent,
    );
    pluginsComponentsRegistryService.registerComponent(
      'directadmin', 'staff', 'OrderProduct', DirectAdminOrderProductComponent,
    );

    pluginsComponentsRegistryService.registerServiceTab(
      'domains', 'staff', 'overview', $localize`Overview`, DomainDetailsOverviewComponent,
    )
    pluginsComponentsRegistryService.registerServiceTab(
      'domains', 'staff', 'nameservers', $localize`Nameservers`, DomainDetailsNameserversComponent,
    )
    pluginsComponentsRegistryService.registerComponent(
      'directadmin', 'staff', 'EditCartItem', DirectAdminOrderProductComponent,
    );
  }

  ngOnInit() {
  }
}
