import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { ZXingScannerModule } from '@zxing/ngx-scanner';
import { CardModule, LoadingModule, ButtonModule, IconModule, ModalModule } from '@libs/ui';
import { BarcodeScannerModule, CustomerCardScannerModule } from 'shared/public_api';

import { SharedModule } from '../../shared/shared.module';
import { RecommendationsdModule } from '../recommendations/recommendations.module';
import { BarcodeSearchComponent } from './pages/article-barcode-search/barcode-search.component';
import { CustomerCardBarcodeSearchComponent } from './pages/customer-card-barcode-search/customer-card-barcode-search.component';
import { BarcodeScannerComponent } from './components/barcode-scanner/barcode-scanner.component';
import { CustomerCardManualEntryComponent } from './components/customer-card-manual-entry/customer-card-manual-entry.component';
import { CustomerCardSearchEmptyModalComponent } from './components/customer-card-search-empty-modal/customer-card-search-empty-modal.component';
import { CustomerCardSearchErrorModalComponent } from './components/customer-card-search-error-modal/customer-card-search-error-modal.component';

@NgModule({
  imports: [
    ZXingScannerModule,
    CommonModule,
    SharedModule,
    RecommendationsdModule,
    CardModule,
    BarcodeScannerModule,
    CustomerCardScannerModule,
    LoadingModule,
    ButtonModule,
    IconModule,
    ModalModule,
    FormsModule,
  ],
  exports: [
    BarcodeSearchComponent,
    CustomerCardBarcodeSearchComponent,
    CustomerCardManualEntryComponent,
    BarcodeScannerModule,
    BarcodeScannerComponent,
  ],
  declarations: [
    BarcodeSearchComponent,
    BarcodeScannerComponent,
    CustomerCardBarcodeSearchComponent,
    CustomerCardManualEntryComponent,
    CustomerCardSearchEmptyModalComponent,
    CustomerCardSearchErrorModalComponent,
  ],
})
export class BarcodeSearchModule {}
