import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { RouterModule } from '@angular/router';
import { SideNavMenuComponent } from './menu/side-nav-menu/side-nav-menu.component';
import { MatTreeModule } from '@angular/material/tree';
import { MatButtonModule } from '@angular/material/button';
import { MatToolbarModule } from '@angular/material/toolbar';
import { MatIconModule } from '@angular/material/icon';
import { LogoComponent } from './logo/logo.component';
import { MenuItemComponent } from './menu/menu-item/menu-item.component';
import { MenuItemContainerComponent } from './menu/menu-item-container/menu-item-container.component';
import { MatProgressBarModule } from '@angular/material/progress-bar';
import { MatFormFieldModule } from '@angular/material/form-field';
import { MatInputModule } from '@angular/material/input';
import { MatMenuModule } from '@angular/material/menu';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { GravatarComponent } from './gravatar/gravatar.component';
import { IconComponent } from './common/icon/icon.component';
import { FlBackdropComponent } from './fl-backdrop/fl-backdrop.component';
import { PhoneInputComponent } from '../fleio-data-controls/phone-input/phone-input.component';
import { MatRippleModule } from '@angular/material/core';
import { MatSelectModule } from '@angular/material/select';
import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
import { UploadInterfaceComponent } from './upload-interface/upload-interface.component';
import { YesNoPipe } from './common/pipes/yes-no.pipe';
import { SnackbarWithLinkComponent } from './snackbar-with-link/snackbar-with-link.component';
import { FormSubmitDirective } from './common/directives/form-submit.directive';
import { NullValuePipe } from '@shared/ui/common/pipes/null-value.pipe';
import { FieldRequiredErrPipe } from '@shared/ui/common/pipes/field-required-err.pipe';
import { ErrorFormatterPipe } from '@shared/ui/common/pipes/error-formatter.pipe';
import { ClientAvatarComponent } from './client-icon/client-avatar.component';
import { FlashingDotsComponent } from './flashing-dots/flashing-dots.component';
import { FlexDirective } from './layout/flex.directive';
import { LayoutGapDirective } from './layout/layout-gap.directive';
import { CurrencyFormatterPipe } from './common/pipes/currency-formatter.pipe';
import { DateFormatterPipe } from './common/pipes/date-formatter.pipe';
import { DateDisplayerComponent } from './date-displayer/date-displayer.component';
import { MatTableModule } from '@angular/material/table';
import { MatAutocompleteModule } from '@angular/material/autocomplete';
import { MatCheckboxModule } from '@angular/material/checkbox';
import { MatListModule } from '@angular/material/list';
import { MatDatepickerModule } from '@angular/material/datepicker';
import { MatRadioModule } from '@angular/material/radio';
import { MatSlideToggleModule } from '@angular/material/slide-toggle';

@NgModule({
  declarations: [
    SideNavMenuComponent,
    LogoComponent,
    MenuItemComponent,
    MenuItemContainerComponent,
    GravatarComponent,
    IconComponent,
    FlBackdropComponent,
    PhoneInputComponent,
    UploadInterfaceComponent,
    YesNoPipe,
    SnackbarWithLinkComponent,
    FormSubmitDirective,
    NullValuePipe,
    FieldRequiredErrPipe,
    ErrorFormatterPipe,
    ClientAvatarComponent,
    FlashingDotsComponent,
    FlexDirective,
    LayoutGapDirective,
    CurrencyFormatterPipe,
    DateFormatterPipe,
    DateDisplayerComponent,
  ],
  exports: [
    IconComponent,
    LogoComponent,
    GravatarComponent,
    FlBackdropComponent,
    PhoneInputComponent,
    SideNavMenuComponent,
    UploadInterfaceComponent,
    YesNoPipe,
    FormSubmitDirective,
    NullValuePipe,
    FieldRequiredErrPipe,
    ErrorFormatterPipe,
    ClientAvatarComponent,
    FlashingDotsComponent,
    FlexDirective,
    LayoutGapDirective,
    CurrencyFormatterPipe,
    DateFormatterPipe,
    DateDisplayerComponent,

    // re-export angular modules
    FormsModule,
    MatAutocompleteModule,
    MatButtonModule,
    MatCheckboxModule,
    MatDatepickerModule,
    MatFormFieldModule,
    MatIconModule,
    MatInputModule,
    MatListModule,
    MatMenuModule,
    MatProgressBarModule,
    MatProgressSpinnerModule,
    MatRadioModule,
    MatRippleModule,
    MatSelectModule,
    MatSlideToggleModule,
    MatTableModule,
    MatToolbarModule,
    MatTreeModule,
    ReactiveFormsModule,
    RouterModule,
  ],
  imports: [
    CommonModule,
    FormsModule,
    MatAutocompleteModule,
    MatButtonModule,
    MatCheckboxModule,
    MatDatepickerModule,
    MatFormFieldModule,
    MatIconModule,
    MatInputModule,
    MatListModule,
    MatMenuModule,
    MatProgressBarModule,
    MatProgressSpinnerModule,
    MatRadioModule,
    MatRippleModule,
    MatSelectModule,
    MatSlideToggleModule,
    MatTableModule,
    MatToolbarModule,
    MatTreeModule,
    ReactiveFormsModule,
    RouterModule,
  ]
})
export class UiModule {
}
