import {LOCALE_ID, NgModule} from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
import {MenubarModule} from 'primeng/menubar';
import {MenuModule} from 'primeng/menu';
import {ButtonModule} from 'primeng/button';
import {BrowserAnimationsModule} from "@angular/platform-browser/animations";
import {HomeComponent} from './component/home/home.component';
import {AccordionModule} from 'primeng/accordion';
import {MessageService, SharedModule} from "primeng/api";
import {CheckboxModule} from 'primeng/checkbox';
import {FormsModule, ReactiveFormsModule} from "@angular/forms";
import {DataViewModule} from "primeng/dataview";
import {RatingModule} from "primeng/rating";
import {HTTP_INTERCEPTORS, HttpClientModule} from "@angular/common/http";
import {MultiSelectModule} from 'primeng/multiselect';
import {DropdownModule} from "primeng/dropdown";
import {InputTextModule} from "primeng/inputtext";
import {TooltipModule} from "primeng/tooltip";
import {CardModule} from "primeng/card";
import {TagModule} from "primeng/tag";
import {ResourceComponent } from './component/resource/resource.component';
import {AddResourceComponent } from './component/add-resource/add-resource.component';
import {InputTextareaModule} from "primeng/inputtextarea";
import {RadioButtonModule} from "primeng/radiobutton";
import {FileUploadModule} from "primeng/fileupload";
import {ChipsModule} from 'primeng/chips';
import {MessagesModule} from 'primeng/messages';
import {MessageModule} from 'primeng/message';
import {ToastModule} from 'primeng/toast';
import {PanelModule} from "primeng/panel";
import {HashLocationStrategy, LocationStrategy} from "@angular/common";
import {CascadeSelectModule} from 'primeng/cascadeselect';
import {DialogModule} from 'primeng/dialog';
import { ApproveResourceComponent } from './component/approve-resource/approve-resource.component';
import {TableModule} from "primeng/table";
import { LoginComponent } from './component/login/login.component';
import {NgxsStoragePluginModule} from '@ngxs/storage-plugin';
import {NgxsModule} from '@ngxs/store';
import {UserState} from "./states/user.state";
import {environment} from "../environments/environment";
import {AuthInterceptor} from "./guard/auth.interceptor";
import { HeaderMenuComponent } from './component/header-menu/header-menu.component';
import {ImageModule} from "primeng/image";
import {ConfirmPopupModule} from 'primeng/confirmpopup';
import {ConfirmationService} from 'primeng/api';
import {ConfirmDialogModule} from "primeng/confirmdialog";
import {LazyLoadImageModule} from 'ng-lazyload-image';
import {FooterComponent } from './component/footer/footer.component';
import {ChangePasswordComponent } from './component/change-password/change-password.component';
import {CheckPasswordDirective } from './validator/check-password.directive';
import {BadgeModule} from "primeng/badge";
import {ClipboardModule } from 'ngx-clipboard';
import {AvatarModule} from 'primeng/avatar';
import {AvatarGroupModule} from 'primeng/avatargroup';
import {HelpComponent } from './component/help/help.component';
import {DividerModule} from 'primeng/divider';
import {ProgressSpinner, ProgressSpinnerModule} from "primeng/progressspinner";
import {TabViewModule} from 'primeng/tabview';
import {EditorModule} from "primeng/editor";

@NgModule({
  declarations: [
    AppComponent,
    HomeComponent,
    ResourceComponent,
    AddResourceComponent,
    ApproveResourceComponent,
    LoginComponent,
    HeaderMenuComponent,
    FooterComponent,
    ChangePasswordComponent,
    CheckPasswordDirective,
    HelpComponent
  ],
    imports: [
        BrowserModule,
        BrowserAnimationsModule,
        AppRoutingModule,
        MenubarModule,
        ButtonModule,
        MenuModule,
        AccordionModule,
        SharedModule,
        FormsModule,
        DataViewModule,
        RatingModule,
        HttpClientModule,
        MultiSelectModule,
        DropdownModule,
        InputTextModule,
        TooltipModule,
        CardModule,
        TagModule,
        InputTextModule,
        CheckboxModule,
        ButtonModule,
        RadioButtonModule,
        InputTextareaModule,
        FileUploadModule,
        ChipsModule,
        MessagesModule,
        MessageModule,
        ToastModule,
        PanelModule,
        CascadeSelectModule,
        DialogModule,
        TableModule,
        NgxsModule.forRoot([UserState], {developmentMode: !environment.production}),
        NgxsStoragePluginModule.forRoot(),
        ReactiveFormsModule,
        ToastModule,
        ImageModule,
        ConfirmPopupModule,
        ConfirmDialogModule,
        LazyLoadImageModule,
        BadgeModule,
        ClipboardModule,
        AvatarModule,
        AvatarGroupModule,
        DividerModule,
        ProgressSpinnerModule,
        TabViewModule,
        EditorModule
    ],
  providers: [MessageService,ConfirmationService,
    {provide: LocationStrategy, useClass: HashLocationStrategy},
    {
      provide: HTTP_INTERCEPTORS,
      useClass: AuthInterceptor,
      multi: true
  }
],
  bootstrap: [AppComponent]
})
export class AppModule { }
