import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { ComponentsModule } from '@components/components.module';
import { FlightsModule } from '@modules/flights.module';
import { SharedModule } from '@shared';
import { ToolkitModule } from '@toolkit/toolkit.module';
import { PopularRequestsModule } from '../popular-requests/popular-requests.module';
import { OnlineBoardFilterModule } from './components/filter/online-board-filter.module';
import { CanActivateArrivalSearch } from './guards/can-activate-arrival-search';
import { CanActivateDepartureSearch } from './guards/can-activate-departure-search';
import { CanActivateOnlineBoardDetails } from './guards/can-activate-details';
import { CanActivateFlightNumberSearch } from './guards/can-activate-flight-number-search';
import { CanActivateRouteSearch } from './guards/can-activate-route-search';
import { CanActivateDateParams } from './guards/utils/can-activate-date-params';
import { CanActivateRouteParams } from './guards/utils/can-activate-route-params';
import { CanActivateStations } from './guards/utils/can-activate-stations';
import { OnlineBoardRoutingModule } from './online-board-routing.module';
import { CanActivateRedirrect } from './guards/utils/can-activate-redirrect-to-not-found';
import { OnlineBoardFlightsMiniListComponent } from './pages/flight-details/components/flights-mini-list/online-board-flights-mini-list.component';
import { OnlineBoardFlightDetailsMetaTagsComponent } from './pages/flight-details/components/meta-tags/flight-details-meta-tags.component';
import { OnlineBoardFlightDetailsTitleComponent } from './pages/flight-details/components/title/flight-details-title.component';
import { OnlineBoardDetailsViewComponent } from './pages/flight-details/components/view/online-board-details.component';
import { OnlineBoardFlightDetailsPageComponent } from './pages/flight-details/flight-details-page.component';
import { ArrivalSearchPageComponent } from './pages/search/arrival/arrival-search-page.component';
import { OnlineBoardArrivalMetaTagsComponent } from './pages/search/arrival/components/meta-tags/online-board-arrival-meta-tags.component';
import { OnlineBoardArrivalTitleComponent } from './pages/search/arrival/components/title/online-board-arrival-title.component';
import { OnlineBoardSearchPageBaseComponent } from './pages/search/components/base/search-page-base.component';
import { OnlineBoardSearchComponent } from './pages/search/components/view/online-board-search.component';
import { OnlineBoardDepartureMetaTagsComponent } from './pages/search/departure/components/meta-tags/online-board-departure-meta-tags.component';
import { OnlineBoardDepartureTitleComponent } from './pages/search/departure/components/title/online-board-departure-title.component';
import { DepartureSearchPageComponent } from './pages/search/departure/departure-search-page.component';
import { OnlineBoardFlightNumberMetaTagsComponent } from './pages/search/flight-number-search/components/meta-tags/online-board-flight-number-meta-tags.component';
import { OnlineBoardFlightNumberTitleComponent } from './pages/search/flight-number-search/components/title/online-board-flight-number-title.component';
import { FlightNumberSearchPageComponent } from './pages/search/flight-number-search/flight-number-search-page.component';
import { OnlineBoardRouteMetaTagsComponent } from './pages/search/route-search/components/meta-tags/online-board-route-meta-tags.component';
import { OnlineBoardRouteTitleComponent } from './pages/search/route-search/components/title/online-board-route-title.component';
import { RouteSearchPageComponent } from './pages/search/route-search/route-search-page.component';
import { OnlineBoardStartPageMetaTagsComponent } from './pages/start/components/meta-tags/online-board-start-page-meta-tags.component';
import { OnlineBoardStartPageTitleComponent } from './pages/start/components/title/start-page-title.component';
import { OnlineBoardStartPageComponent } from './pages/start/online-board-start-page.component';
import { OnlineBoardDetailsBreadCrumbsResolver } from './resolvers/bread-crumbs/details-bread-crumbs.resolver';
import { OnlineBoardRouteSearchBreadCrumbsResolver } from './resolvers/bread-crumbs/route-search-bread-crumbs.resolver';
import { OnlineBoardRequestDataResolver } from './resolvers/request-data.resolver';
import { OnlineBoardArrivalUrlParamsResolver } from './resolvers/url-params/arrival-url-params.resolver';
import { OnlineBoardDepartureUrlParamsResolver } from './resolvers/url-params/departure-url-params.resolver';
import { OnlineBoardDetailsUrlParamsResolver } from './resolvers/url-params/details-url-params.resolver';
import { OnlineBoardFlightNumberUrlParamsResolver } from './resolvers/url-params/flight-number-url-params.resolver';
import { OnlineBoardRouteUrlParamsResolver } from './resolvers/url-params/route-url-params.resolver';
import { OnlineBoardApiService } from './services/api.service';
import { OnlineBoardBreadCrumbService } from './services/bread-crumb.service';
import { OnlineBoardDataSourceService } from './services/data-source.service';
import { OnlineBoardDateValidationService } from './services/date-validation.service';
import { OnlineBoardFilterService } from './services/filter/filter.service';
import { OnlineBoardMetaTagsService } from './services/meta-tags.service';
import { OnlineBoardNavigationService } from './services/navigation.service';
import { OnlineBoardRequestBuilderService } from './services/request/request-builder.service';
import { OnlineBoardRequestParserService } from './services/request/request-parser.service';
import { OnlineBoardTitleService } from './services/title.service';
import { FadeService } from './services/fade.service';

import {
    ONLINE_BOARD_URL_BASE,
    OnlineBoardUrlBuilderService,
    OnlineBoardUrlParserService,
} from './services/url';

@NgModule({
    declarations: [
        OnlineBoardStartPageComponent,
        FlightNumberSearchPageComponent,
        DepartureSearchPageComponent,
        ArrivalSearchPageComponent,
        RouteSearchPageComponent,
        OnlineBoardFlightDetailsPageComponent,
        OnlineBoardArrivalMetaTagsComponent,
        OnlineBoardArrivalTitleComponent,
        OnlineBoardSearchComponent,
        OnlineBoardDepartureMetaTagsComponent,
        OnlineBoardDepartureTitleComponent,
        OnlineBoardRouteTitleComponent,
        OnlineBoardRouteMetaTagsComponent,
        OnlineBoardFlightNumberMetaTagsComponent,
        OnlineBoardFlightNumberTitleComponent,
        OnlineBoardDetailsViewComponent,
        OnlineBoardFlightDetailsTitleComponent,
        OnlineBoardFlightDetailsMetaTagsComponent,
        OnlineBoardStartPageMetaTagsComponent,
        OnlineBoardStartPageTitleComponent,
        OnlineBoardFlightsMiniListComponent,
        OnlineBoardSearchPageBaseComponent,
    ],
    providers: [
        OnlineBoardApiService,
        OnlineBoardDataSourceService,
        OnlineBoardDateValidationService,
        CanActivateFlightNumberSearch,
        CanActivateRouteSearch,
        CanActivateArrivalSearch,
        CanActivateDepartureSearch,
        CanActivateStations,
        CanActivateRedirrect,
        CanActivateDateParams,
        CanActivateRouteParams,
        OnlineBoardNavigationService,
        OnlineBoardUrlBuilderService,
        OnlineBoardUrlParserService,
        OnlineBoardRequestBuilderService,
        OnlineBoardRequestParserService,
        OnlineBoardFilterService,
        OnlineBoardArrivalUrlParamsResolver,
        OnlineBoardDepartureUrlParamsResolver,
        OnlineBoardFlightNumberUrlParamsResolver,
        OnlineBoardRouteUrlParamsResolver,
        OnlineBoardTitleService,
        OnlineBoardMetaTagsService,
        OnlineBoardDetailsUrlParamsResolver,
        OnlineBoardRequestDataResolver,
        OnlineBoardBreadCrumbService,
        OnlineBoardRouteSearchBreadCrumbsResolver,
        OnlineBoardDetailsBreadCrumbsResolver,
        FadeService,
        CanActivateOnlineBoardDetails,
        {
            provide: ONLINE_BOARD_URL_BASE,
            useValue: 'onlineboard',
        },
    ],
    imports: [
        CommonModule,
        OnlineBoardRoutingModule,
        FlightsModule,
        SharedModule,
        ToolkitModule,
        FormsModule,
        ComponentsModule,
        OnlineBoardFilterModule,
        PopularRequestsModule,
    ],
})
export class OnlineBoardModule {}
