/*
 * Copyright (C) 2023 StApps
 * This program is free software: you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the Free
 * Software Foundation, version 3.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
 * more details.
 *
 * You should have received a copy of the GNU General Public License along with
 * this program. If not, see <https://www.gnu.org/licenses/>.
 */
import {CommonModule} from '@angular/common';
import {NgModule} from '@angular/core';
import {FormsModule} from '@angular/forms';
import {RouterModule, Routes} from '@angular/router';
import {SwiperModule} from 'swiper/angular';
import {TranslateModule, TranslatePipe} from '@ngx-translate/core';
import {MomentModule} from 'ngx-moment';
import {DataModule} from '../data/data.module';
import {SettingsProvider} from '../settings/settings.provider';
import {DashboardComponent} from './dashboard.component';
import {SearchSectionComponent} from './sections/search-section/search-section.component';
import {NewsSectionComponent} from './sections/news-section/news-section.component';
import {MensaSectionComponent} from './sections/mensa-section/mensa-section.component';
import {MensaSectionContentComponent} from './sections/mensa-section/mensa-section-content.component';
import {FavoritesSectionComponent} from './sections/favorites-section/favorites-section.component';
import {ThingTranslateModule} from '../../translation/thing-translate.module';
import {UtilModule} from '../../util/util.module';
import {NewsModule} from '../news/news.module';
import {JobSectionComponent} from './sections/jobs-section/job-section.component';
import {JobModule} from '../jobs/jobs.module';
import {
  IonHeader,
  IonToolbar,
  IonLabel,
  IonImg,
  IonContent,
  IonButton,
  IonItem,
  IonThumbnail,
  IonSearchbar,
  IonRippleEffect,
  IonRouterLink,
} from '@ionic/angular/standalone';
import {IonIconDirective} from 'src/app/util/ion-icon/ion-icon.directive';

const catalogRoutes: Routes = [
  {
    path: 'overview',
    component: DashboardComponent,
  },
];

/**
 * Catalog Module
 */
@NgModule({
  declarations: [
    SearchSectionComponent,
    NewsSectionComponent,
    MensaSectionComponent,
    MensaSectionContentComponent,
    FavoritesSectionComponent,
    DashboardComponent,
    JobSectionComponent,
  ],
  imports: [
    IonIconDirective,
    FormsModule,
    TranslateModule.forChild(),
    RouterModule.forChild(catalogRoutes),
    CommonModule,
    MomentModule,
    DataModule,
    SwiperModule,
    ThingTranslateModule.forChild(),
    UtilModule,
    NewsModule,
    JobModule,
    IonHeader,
    IonToolbar,
    IonImg,
    IonContent,
    IonButton,
    IonItem,
    IonLabel,
    IonThumbnail,
    IonSearchbar,
    IonRippleEffect,
    IonRouterLink,
  ],
  providers: [SettingsProvider, TranslatePipe],
})
export class DashboardModule {}
