import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { AppCommonModule } from '@app/shared/common/app-common.module';
import { UtilsModule } from '@shared/utils/utils.module';
import { FileUploadModule } from 'ng2-file-upload';
import { ModalModule, PopoverModule, TabsModule, TooltipModule, BsDropdownModule, TimepickerModule } from 'ngx-bootstrap';
import { TimePickerModule } from '@progress/kendo-angular-dateinputs';
import { BsDatepickerModule, BsDatepickerConfig, BsDaterangepickerConfig, BsLocaleService } from 'ngx-bootstrap/datepicker';
import { AutoCompleteModule } from 'primeng/autocomplete';
import { EditorModule} from 'primeng/editor';
import { FileUploadModule as PrimeNgFileUploadModule } from 'primeng/fileupload';
import { InputMaskModule } from 'primeng/inputmask';
import { PaginatorModule } from 'primeng/paginator';
import { TableModule } from 'primeng/table';
import { TreeModule } from 'primeng/tree';
import { DragDropModule } from 'primeng/dragdrop';
import { TreeDragDropService } from 'primeng/api';
import { ContextMenuModule } from 'primeng/contextmenu';
import { NgxChartsModule } from '@swimlane/ngx-charts';
import { CountoModule } from 'angular2-counto';
import { TextMaskModule } from 'angular2-text-mask';
import { ImageCropperModule } from 'ngx-image-cropper';
import { AngularFontAwesomeModule } from 'angular-font-awesome';
import { NgxBootstrapDatePickerConfigService } from 'assets/ngx-bootstrap/ngx-bootstrap-datepicker-config.service';
import { SprintShipRoutingModule } from './sprintship-routing.module';
import { OrderStatusTypeComponent } from './order-management/order-status-types/order-status-type.component';
import { CreateOrderStatuTypeModalComponent } from './order-management/order-status-types/create-order-status-types-modal.component';
import { UpdateOrderStatuTypeModalComponent } from './order-management/order-status-types/update-order-status-types-modal.component';
import { TagTypeComponent } from './order-management/tag-types/tag-type.component';
import { CreateTagTypeModalComponent } from './order-management/tag-types/create-tag-types-modal.component';
import { UpdateTagTypeModalComponent } from './order-management/tag-types/update-tag-types-modal.component';
import { OrderComponent } from './order-management/orders/order.component';

// import { CreateFleetModalComponent } from './fleet-management/fleet/create-fleet-modal.component';
// import { EditFleetModalComponent } from './fleet-management/fleet/edit-fleet-modal.component';

import { VehiclesComponent } from './fleet-management/vehicle/vehicles.component';
import { CreateVehicleModalComponent } from './fleet-management/vehicle/create-vehicle-modal.component';
import { EditVehicleModalComponent } from './fleet-management/vehicle/edit-vehicle-modal.component';
import { ContactComponent } from './contact-management/contacts/contacts.component';
import { CreateContactModalComponent } from './contact-management/contacts/create-contact-modal.component';
import { EditContactModalComponent } from './contact-management/contacts/edit-contact-modal.component';

// import { AddressTypeComponent } from './contact-management/address-types/address-types.component';
// import { CreateAddressTypeModalComponent } from './contact-management/address-types/create-address-type-modal.component';
// import { UpdateAddressTypeModalComponent } from './contact-management/address-types/edit-address-type-modal.component';

// import { TimeZonesComponent } from './location-management/timezones/timezones.component';
// import { CreateTimeZoneModalComponent } from './location-management/timezones/create-timezones-modal.component';
// import { EditTimeZoneModalComponent } from './location-management/timezones/edit-timezones-modal.component';
import { ProximityComponent } from './location-management/proximity/proximity.component';
import { CreateProximityModalComponent } from './location-management/proximity/create-proximity-modal.component';
import { EditProximityModalComponent } from './location-management/proximity/edit-proximity-modal.component';
import { LocationsComponent } from './location-management/locations/location.component';
import { CreateLocationModalComponent } from './location-management/locations/create-location-modal.component';
import { CreateUpdateLocationComponent } from './location-management/locations/create-update-location.component';
import { EditLocationComponent } from './location-management/locations/edit-location.component';
import { EditLocationModalComponent } from './location-management/locations/edit-location-modal.component';
import { VehicleLocationComponent } from './location-management/vehicle-location/vehicle-location.component';
import { CreateVehicleLocationModalComponent } from './location-management/vehicle-location/create-vehicle-location-modal.component';
import { EditVehicleLocationModalComponent } from './location-management/vehicle-location/edit-vehicle-location-modal.component';
import { UserLocationComponent } from './location-management/user-location/user-location.component';
import { CreateUserLocationModalComponent } from './location-management/user-location/create-user-location-modal.component';
import { EditUserLocationModalComponent } from './location-management/user-location/edit-user-location-modal.component';
import { IncidentComponent } from './incident/incident.component';
import { CreateIncidentModalComponent } from './incident/create-incident-modal.component';
import { EditIncidentModalComponent } from './incident/edit-incident-modal.component';
import { ViewIncidentImageModalComponent } from './incident/view-incident-image-modal.component';
import { CreateOrderModalComponent } from './order-management/orders/create-order-modal.component';
import { RoutesComponent } from './routes/routes.component';
import { CreateRouteModalComponent } from './routes/create-routes-modal.component';
import { EditRouteModalComponent } from './routes/edit-routes-modal.component';
import { RoutesTemplateComponent } from './routes-template/routestemplate.component';
import { RouteTemplateTypesComponent } from './route-template-types/route-template-types.component';
import { CreateRouteTemplateTypeModalComponent } from './route-template-types/create-route-template-types-modal.component';
import { EditRouteTemplateTypeModalComponent } from './route-template-types/edit-route-template-types-modal.component';
import { CreateOrEditRoutesTemplateModalComponent } from './routes-template/create-or-edit-routestemplate-modal.component';
import { PackageTypeComponent } from './package-management/package-types/package-type.component';
import { CreatePackageTypeModalComponent } from './package-management/package-types/create-packagetype-modal.component';
import { UpdatePackageTypeModalComponent } from './package-management/package-types/update-packagetype-modal.component';
import { TimeSheetComponent } from './employees/timesheets/timesheet.component';
import { CreateOrEditTimeSheetModalComponent } from './employees/timesheets/create-or-edit-timesheet.component';
import { EmployeeReviewComponent } from './employees/reviews/employee-review.component';
import { DriverIncidentsComponent } from './employees/driver-incident/driver-incidents.component';
import { CreateOrEditDriverIncidentModalComponent } from './employees/driver-incident/create-or-edit-driver-incident.component';
import { CreateOrEditEmployeeReviewModalComponent } from './employees/reviews/create-or-edit-review.component';
// import { AddressComponent } from './contact-management/addresses/address.component';
// import { CreateAddressModalComponent } from './contact-management/addresses/create-address-modal.component';
// import { UpdateAddressModalComponent } from './contact-management/addresses/edit-address-modal.component';
import { AddressesComponent } from './contact-management/addresses/addresses.component';
import { ViewAddressModalComponent } from './contact-management/addresses/view-address-modal.component';
import { CreateOrEditAddressModalComponent } from './contact-management/addresses/create-or-edit-address-modal.component';
import { EmailComponent } from './contact-management/emails/email.component';
import { CreateEmailModalComponent } from './contact-management/emails/create-email-modal.component';
import { DriversComponent } from './fleet-management/drivers/drivers.component';
import { TagComponent } from './order-management/tags/tag.component';
import { CreateTagModalComponent } from './order-management/tags/create-tag-modal.component';
import { UpdateTagModalComponent } from './order-management/tags/update-tag-modal.component';
import { OrderPackageComponent } from './order-management/order-package/order-package.component';
import { CreateOrderPackageModalComponent } from './order-management/order-package/create-order-package-modal.component';
import { UpdateOrderPackageModalComponent } from './order-management/order-package/update-order-package-modal.component';
import { OrderStatusComponent } from './order-management/order-status/order-status.component';
import { CreateOrderStatusComponent } from './order-management/order-status/create-order-status.component';
import { VendorsComponent } from './vendor-management/vendors/vendors.component';
import { CreateDriverComponent } from './fleet-management/drivers/create-driver.component';
import { EditDriverComponent } from './fleet-management/drivers/edit-driver.component';
import { UpdateOrderComponent } from './order-management/orders/update-order.component';
import { CreateOrderComponent } from './order-management/orders/create-order.component';
import { CreateVendorComponent } from './vendor-management/vendors/create-vendor.component';
import { EditVendorComponent } from './vendor-management/vendors/edit-vendor.component';
import { AddressFormComponent } from '@app/shared/layout/form/address-form.component';
import { CreateContactComponent } from './contact-management/contacts/create-contact.component';
import { EditContactComponent } from './contact-management/contacts/edit-contact.component';
import { ContactFormComponent } from '@app/shared/layout/form/contact.form.component';
// import { PostalCodesComponent } from './contact-management/postal-codes/postal-codes.component';
// import { CreatePostalCodesModalComponent } from './contact-management/postal-codes/create-postal-codes-modal.component';
// import { EditPostalCodesModalComponent } from './contact-management/postal-codes/edit-postal-codes-modal.component';
import { CRoutesComponent } from './controller/routes/croutes.component';
import { RouteDetailComponent } from './controller/route-detail/route-detail.component';
import { KPIBoxComponent } from './controller/kpi-box/kpi-box.component';
import { TableComponents } from './core-components/table-details.component';
import { AppConsts } from '@shared/AppConsts';
import { FlyOutComponent } from '@app/shared/layout/flyout/flyout.component';
import { MapFlyOutComponent } from '@app/shared/layout/flyout/map/map-flyout.component';
import { TableRoutesComponents } from './controller/routes/table-routes-details.component';
import { AgmCoreModule } from '@agm/core';
import { DevicesComponent } from './controller/devices/devices.component';
import { StatusComponent } from './controller/status/status.component';
import { CheckBoxComponent } from './core-components/checkbox/checkbox.component';
import { LocatorComponent } from './locator/locator.component';
import { DriverListTabComponent } from './controller/drivers/driver-list.component';
import { NgSelectModule } from '@ng-select/ng-select';
import { ColorPickerModule } from 'primeng/components/colorpicker/colorpicker';
import { ControllerShowHideComponent } from './controller/core-components/controller-show-hide-modal.component';
import { HFRouteDetailComponent } from './controller/route-detail/hf-route-detail.component';
import { LabRouteDetailComponent } from './controller/route-detail/lab-route-detail.component';
import { AgmOverlays } from "agm-overlays";
import { AgmJsMarkerClustererModule } from '@agm/js-marker-clusterer';
import { MoveOrderModalComponent } from './locator/move-order.component';
import { FleetsComponent } from './fleet-management/fleets/fleets.component';
import { ViewFleetModalComponent } from './fleet-management/fleets/view-fleet-modal.component';
import { CreateOrEditFleetModalComponent } from './fleet-management/fleets/create-or-edit-fleet-modal.component';
import { TimeZonesComponent } from './location-management/timezones/timezones.component';
import { ViewTimeZoneModalComponent } from './location-management/timezones/view-timeZone-modal.component';
import { CreateOrEditTimeZoneModalComponent } from './location-management/timezones/create-or-edit-timeZone-modal.component';
import { PackagesComponent } from './package-management/package-type/packages.component';
import { CreateOrEditPackageModalComponent } from './package-management/package-type/create-or-edit-package-modal.component';
import { ViewPackageModalComponent } from './package-management/package-type/view-package-modal.component';
import { TagsComponent } from './order-management/tags-rad/tags.component';
import { CreateOrEditTagModalComponent } from './order-management/tags-rad/create-or-edit-tag-modal.component';
import { ViewTagModalComponent } from './order-management/tags-rad/view-tag-modal.component';
import { OrderPackagesComponent } from './order-management/order-package-rad/orderPackages.component';
import { ViewOrderPackageModalComponent } from './order-management/order-package-rad/view-orderPackage-modal.component';
import { CreateOrEditOrderPackageModalComponent } from './order-management/order-package-rad/create-or-edit-orderPackage-modal.component';
import { CreateOrEditOrderStatusModalComponent } from './order-management/order-status-rad/create-or-edit-orderStatus-modal.component';
import { OrderStatusesComponent } from './order-management/order-status-rad/orderStatuses.component';
import { ViewOrderStatusModalComponent } from './order-management/order-status-rad/view-orderStatus-modal.component';
import { AddressTypesComponent } from './contact-management/address-types/addressTypes.component';
import { ViewAddressTypeModalComponent } from './contact-management/address-types/view-addressType-modal.component';
import { CreateOrEditAddressTypeModalComponent } from './contact-management/address-types/create-or-edit-addressType-modal.component';
import { ViewPostalCodeModalComponent } from './contact-management/postal-codes/view-postalCode-modal.component';
import { CreateOrEditPostalCodeModalComponent } from './contact-management/postal-codes/create-or-edit-postalCode-modal.component';
import { PostalCodesComponent } from './contact-management/postal-codes/postalCodes.component';
import { VehicleListTabComponent } from './controller/vehicles/vehicle-list.component';
import { OrderListTabComponent } from './controller/orders/order-list.component';
import { GenerateRoutesTrackingComponent } from './controller/routes/generate-routes-tracking.component';
import { GenerateRoutesLaboratoryTrackingComponent } from './controller/routes-laboratory/generate-routes-laboratory-tracking.component';
import { OrderStatusTypesComponent } from './order-management/order-status-types-rad/orderStatusTypes.component';
import { ViewOrderStatusTypeModalComponent } from './order-management/order-status-types-rad/view-orderStatusType-modal.component';
import { CreateOrEditOrderStatusTypeModalComponent } from './order-management/order-status-types-rad/create-or-edit-orderStatusType-modal.component';
import { TagTypesComponent } from './order-management/tag-types-rad/tagTypes.component';
import { CreateOrEditTagTypeModalComponent } from './order-management/tag-types-rad/create-or-edit-tagType-modal.component';
import { ViewTagTypeModalComponent } from './order-management/tag-types-rad/view-tagType-modal.component';

import { RouteDetailModal } from './controller/route-detail/route-detail-modal.component';
import { ControllerContainerComponent } from './controller/routes-container/routes-container.component';
import { CRoutesLaboratoryComponent } from './controller/routes-laboratory/croutes.laboratory.component';
import { TableRoutesLaboratoryComponents } from './controller/routes-laboratory/table-routes-laboratory-details.component';
import { UserPreferencesFlyoutComponent } from '@app/shared/layout/flyout/user-preferences/user-preferences-flyout.component';
import { LaboratoryMapFlyOutComponent } from '@app/shared/layout/flyout/map/laboratory/laboratory-map-flyout.component';
import { ViewOrderComponent } from './order-management/orders/view-order.component';
import { ControllerOrderPackagesComponent } from './controller/order-packages/order-packages-list.component';
import { OrderDetailComponent } from './controller/order-detail/order-detail.component';
import { VehicleDetailComponent } from './controller/vehicles/vehicle-route-details.component';
import { ClinicNotes } from './controller/route-detail/clinic-notes.component';
import { ControllerOrderPackageDetailComponent } from './controller/order-packages/order-packages-detail.component';
import { UpdateOrderAddressModalComponent } from './order-management/orders/update-address-modal.component';
import { DriverDetailComponent } from './controller/drivers/driver-details.component';
import { AngularDualListBoxModule } from 'angular-dual-listbox';
import { CreateRouteControllerModalComponent } from './controller/modals/create-routes-controller-modal.component' 

import { UnassignedPackagesComponent } from './controller/kpi-box/unassigned/unassigned.component';
 
@NgModule({
    imports: [
        AngularDualListBoxModule,
        FormsModule,
        ReactiveFormsModule,
        CommonModule,
        FileUploadModule,
        ModalModule.forRoot(),
        TabsModule.forRoot(),
        TooltipModule.forRoot(),
        PopoverModule.forRoot(),
        BsDropdownModule.forRoot(),
        BsDatepickerModule.forRoot(),
        TimepickerModule.forRoot(),
        TimePickerModule,
        UtilsModule,
        AppCommonModule,
        TableModule,
        TreeModule,
        DragDropModule,
        ContextMenuModule,
        PaginatorModule,
        PrimeNgFileUploadModule,
        AutoCompleteModule,
        EditorModule,
        InputMaskModule,
        NgxChartsModule,
        CountoModule,
        TextMaskModule,
        ImageCropperModule,
        SprintShipRoutingModule,
        AngularFontAwesomeModule,
        AgmOverlays,
        AgmCoreModule.forRoot({
          // please get your own API key here:
          // https://developers.google.com/maps/documentation/javascript/get-api-key?hl=en
          apiKey: 'AIzaSyDS2kFDBSQClK7PEB8p9gy23KBtP2_MLtE'
        }),
        AgmJsMarkerClustererModule,
        NgSelectModule,
        ColorPickerModule
    ],
    declarations: [
        OrderStatusTypeComponent,
        CreateOrderStatuTypeModalComponent,
        UpdateOrderStatuTypeModalComponent,
        OrderStatusTypesComponent,
        ViewOrderStatusTypeModalComponent,
        CreateOrEditOrderStatusTypeModalComponent,
        TagTypeComponent,
        CreateTagTypeModalComponent,
        UpdateTagTypeModalComponent,
        TagTypesComponent,
        CreateOrEditTagTypeModalComponent,
        ViewTagTypeModalComponent,
        OrderComponent,
        TagComponent,
        CreateTagModalComponent,
        UpdateTagModalComponent,
        TagsComponent,
        CreateOrEditTagModalComponent,
        ViewTagModalComponent,
        CreateOrderModalComponent,
        UpdateOrderComponent,
        UpdateOrderAddressModalComponent,
        ViewOrderComponent,
        CreateOrderComponent,
        OrderPackageComponent,
        CreateOrderPackageModalComponent,
        UpdateOrderPackageModalComponent,
        OrderPackagesComponent,
        ViewOrderPackageModalComponent,
        CreateOrEditOrderPackageModalComponent,
        OrderStatusComponent,
        CreateOrderStatusComponent,
        CreateOrEditOrderStatusModalComponent,
        OrderStatusesComponent,
        ViewOrderStatusModalComponent,
        // FleetsComponent,
        // CreateFleetModalComponent,
        // EditFleetModalComponent,
        FleetsComponent,
        ViewFleetModalComponent,		
        CreateOrEditFleetModalComponent,
        DriversComponent,
        CreateDriverComponent,
        EditDriverComponent,
        VendorsComponent,
        CreateVendorComponent,
        EditVendorComponent,
        VehiclesComponent,
        CreateVehicleModalComponent,
        EditVehicleModalComponent,
        RoutesComponent,
        CreateRouteModalComponent,
        EditRouteModalComponent,
        RoutesTemplateComponent,
        RouteTemplateTypesComponent,
        CreateRouteTemplateTypeModalComponent,
        EditRouteTemplateTypeModalComponent,
        CreateOrEditRoutesTemplateModalComponent,
        EditContactModalComponent,
        CreateUpdateLocationComponent,
        EditLocationComponent,
        ContactComponent,
        CreateContactModalComponent,
        CreateContactComponent,
        EditContactComponent,
        // AddressTypeComponent,
        // CreateAddressTypeModalComponent,
        // UpdateAddressTypeModalComponent,
        AddressTypesComponent,
        ViewAddressTypeModalComponent,		
        CreateOrEditAddressTypeModalComponent,
        // TimeZonesComponent,
        // CreateTimeZoneModalComponent,
        // EditTimeZoneModalComponent,
        TimeZonesComponent,
        ViewTimeZoneModalComponent,		
        CreateOrEditTimeZoneModalComponent,
        ProximityComponent,
        EditProximityModalComponent,
        CreateProximityModalComponent,
        LocationsComponent,
        CreateLocationModalComponent,
        EditLocationModalComponent,
        VehicleLocationComponent,
        CreateVehicleLocationModalComponent,
        EditVehicleLocationModalComponent,
        UserLocationComponent,
        CreateUserLocationModalComponent,
        EditUserLocationModalComponent,
        IncidentComponent,
        CreateIncidentModalComponent,
        EditIncidentModalComponent,
        ViewIncidentImageModalComponent,
        PackagesComponent,
        CreateOrEditPackageModalComponent,
        ViewPackageModalComponent,
        PackageTypeComponent,
        CreatePackageTypeModalComponent,
        UpdatePackageTypeModalComponent,
        TimeSheetComponent,
        CreateOrEditTimeSheetModalComponent,
        EmployeeReviewComponent,
        CreateOrEditEmployeeReviewModalComponent,
        DriverIncidentsComponent,
        CreateOrEditDriverIncidentModalComponent,
        // AddressComponent,
        // CreateAddressModalComponent,
        // UpdateAddressModalComponent,
        AddressesComponent,
        ViewAddressModalComponent,		
        CreateOrEditAddressModalComponent,
        EmailComponent,
        CreateEmailModalComponent,
        AddressFormComponent,
        ContactFormComponent,
        // PostalCodesComponent,
        // CreatePostalCodesModalComponent,
        // EditPostalCodesModalComponent,
        PostalCodesComponent,
        ViewPostalCodeModalComponent,		
        CreateOrEditPostalCodeModalComponent,
        CRoutesComponent,
        GenerateRoutesTrackingComponent,
        GenerateRoutesLaboratoryTrackingComponent,
        KPIBoxComponent,
        TableComponents,
        RouteDetailComponent,
        MapFlyOutComponent,
        LaboratoryMapFlyOutComponent,
        TableRoutesComponents,
        DevicesComponent,
        StatusComponent,
        CheckBoxComponent,
        LocatorComponent,
        DriverListTabComponent,
        VehicleListTabComponent,
        OrderListTabComponent,
        ControllerShowHideComponent,
        HFRouteDetailComponent,
        LabRouteDetailComponent,
        MoveOrderModalComponent,
        RouteDetailModal,
        ControllerContainerComponent,
        CRoutesLaboratoryComponent,
        TableRoutesLaboratoryComponents,
        UserPreferencesFlyoutComponent,
        ControllerOrderPackagesComponent,
        OrderDetailComponent,
        VehicleDetailComponent,
        ClinicNotes,
        ControllerOrderPackageDetailComponent,
        DriverDetailComponent,
        CreateRouteControllerModalComponent,
        DriverDetailComponent,
        UnassignedPackagesComponent
    ],
    exports: [
    ],
    providers: [
        TreeDragDropService,
        { provide: BsDatepickerConfig, useFactory: NgxBootstrapDatePickerConfigService.getDatepickerConfig },
        { provide: BsDaterangepickerConfig, useFactory: NgxBootstrapDatePickerConfigService.getDaterangepickerConfig },
        { provide: BsLocaleService, useFactory: NgxBootstrapDatePickerConfigService.getDatepickerLocale }
    ]
})
export class SprintShipModule { }
