import { NgModule } from '@angular/core';
import { IonicApp, IonicModule } from 'ionic-angular';
import { OdooMobileApp } from './app.component';

import { LoginPage } from '../pages/login/login';
import { HallPage } from '../pages/hall/hall';
import { HomePage } from '../pages/home/home';

import { OdooListHeader } from "../components/odoo-list-header/odoo-list-header";

import { CustomerListPage } from '../pages/customer-list/customer-list';
import { CustomerOptions } from "../pages/customer-list/customer-options";
import { CustomerDetailsPage } from "../pages/customer-details/customer-details";
import { BudgetListPage } from '../pages/budget-list/budget-list';
import { BudgetDetailsPage } from "../pages/budget-details/budget-details";
import { ProductListPage } from '../pages/product-list/product-list';
import { ProductOptions } from '../pages/product-list/product-options';
import { ProductDetailsPage } from '../pages/product-details/product-details';
import { LeadListPage } from '../pages/lead-list/lead-list';
import { OpportunityListPage } from '../pages/opportunity-list/opportunity-list';
import { CallListPage } from '../pages/call-list/call-list';

import { ProjectListPage } from '../pages/project-list/project-list';
import { TaskListPage } from '../pages/task-list/task-list';

import { ToolsPage } from '../pages/tools/tools'
import { SettingsPage } from '../pages/settings/settings';
import { AboutPage } from '../pages/about/about'

import { DataProvider } from '../providers/data-provider';
import { OdooProvider } from '../providers/odoo-provider';
import { SyncProvider } from '../providers/sync-provider';
import { ProductTemplateSyncProvider } from '../providers/sync/product-template-sync-provider';
import { ProductAttributeSyncProvider } from '../providers/sync/product-attribute-sync-provider';
import { ProductAttributeLineSyncProvider } from '../providers/sync/product-attribute-line-sync-provider';
import { ProductAttributeValueSyncProvider } from '../providers/sync/product-attribute-value-sync-provider';
import { NetworkProvider } from '../providers/network-provider';
import { PreferencesProvider } from '../providers/preferences-provider';
import { ToolsProvider } from '../providers/tools-provider';

import { ViewMenuPipe } from '../pipes/view-menu-pipe';
import { ImageSanitizerPipe } from '../pipes/image-sanitizer-pipe';
import { ProductAttributeLinePipe } from '../pipes/product-attribute-line-pipe';
import { ProductAttributeValuePipe } from '../pipes/product-attribute-value-pipe';

import { ChartModule } from 'ng2-chartjs2';
import { DoubleTapDirective } from "../directives/double-tap-directive";

@NgModule({
    declarations: [
        OdooMobileApp,
        // Pages
        LoginPage,
        HallPage,
        HomePage,
        CustomerListPage,
        CustomerOptions,
        CustomerDetailsPage,
        BudgetListPage,
        BudgetDetailsPage,
        ProductListPage,
        ProductOptions,
        ProductDetailsPage,
        LeadListPage,
        OpportunityListPage,
        CallListPage,
        ProjectListPage,
        TaskListPage,
        ToolsPage,
        SettingsPage,
        AboutPage,
        // Pipes
        ViewMenuPipe,
        ImageSanitizerPipe,
        ProductAttributeLinePipe,
        ProductAttributeValuePipe,
        // Directives
        DoubleTapDirective,
        // Components
        OdooListHeader
    ],
    imports: [
        IonicModule.forRoot(OdooMobileApp),
        ChartModule
    ],
    bootstrap: [IonicApp],
    entryComponents: [
        OdooMobileApp,
        // Pages
        LoginPage,
        HallPage,
        HomePage,
        CustomerListPage,
        CustomerOptions,
        CustomerDetailsPage,
        BudgetListPage,
        BudgetDetailsPage,
        ProductListPage,
        ProductOptions,
        ProductDetailsPage,
        LeadListPage,
        OpportunityListPage,
        CallListPage,
        ProjectListPage,
        TaskListPage,
        ToolsPage,
        SettingsPage,
        AboutPage
    ],
    providers: [
        DataProvider,
        OdooProvider,
        SyncProvider,
        ProductTemplateSyncProvider,
        ProductAttributeSyncProvider,
        ProductAttributeLineSyncProvider,
        ProductAttributeValueSyncProvider,
        NetworkProvider,
        PreferencesProvider,
        ToolsProvider
    ]
})
export class AppModule {}
