import {
    FormsModule,
    ReactiveFormsModule,
} from '@angular/forms';

import {NgModule} from '@angular/core';
import {CommonModule} from '@angular/common';
import {NgZorroAntdModule} from 'ng-zorro-antd';
import {NgxNeditorModule} from '@notadd/ngx-neditor';

// 管道
import {
    TimesPipe,
    TextareaPipe,
    SystemPipe,
    CouponStatusPipe,
    CouponCodePipe,
    AuditTypePipe,
    AuditStatusPipe,
    PaymodelPipe,
    PaytypePipe,
    DiscountTypePipe,
    OrderCouponStatusPipe,
    DiscountStatusPipe,
    DisplayAreaPipe,
    DiscountCodeStatusPipe,
    RechargePricePipe,
    RechargeStatusPipe,
    ChannelMarkPipe,
    TypePipe,
    StatusPipe,
    RechargePayTypePipe,
    RefundSourcePipe,
    RefundStatusPipe,
    PreOrderStatusPipe,
    ButtonPipe,
    DiscountPackageStatusPipe,
    PriceShowPipe,
    ShowTypePipe,
    EnergyTypePipe,
    CompanyAmountRecordTypePipe,
    CompanyAmountRecordSourceTypePipe,
    OilCardBindStatusPipe,
    OilCardRecordTypePipe,
    OilCardRecordSourceTypePipe,
    RechargePlatformPipe,
    PriceStatusPipe,
    GasStaffStatusPipe,
    PayStatusPipe,
    ChlidRechargeStatusPipe,
    SourceTypePipe, GasClassGroupTaskStatusPipe, GasOrderStatusPipe, OrderStatusPipe, OrderPayTypePipe, OrderChildGoodsTypePipe
} from './pipes';
import {OilCardStatusPipe} from './pipes';
import {OilTypePipe} from './pipes/store/oil-type.pipe';
import {OilPriceTaskStatusPipe} from './pipes/gas-oil-price/oil-price-task-status.pipe';
import {OilPriceTaskExecutionTypePipe} from './pipes/gas-oil-price/oil-price-task-execution-type.pipe';
import {OilPriceTaskPriceTypePipe} from './pipes/gas-oil-price/oil-price-task-price-type.pipe';
import { PlatformPipe } from './pipes/recharge-pipe/platform.pipe';
import { IntegralTypePipe } from './pipes/integral/integral-type.pipe';
import { IntegralProductPipe } from './pipes/integral/integral-product.pipe';
import {OrderOilStatusPipe} from './pipes/order/order-oil-status.pipe';

const PIPES = [
    TimesPipe,
    TextareaPipe,
    SystemPipe,
    CouponStatusPipe,
    CouponCodePipe,
    AuditTypePipe,
    AuditStatusPipe,
    OrderCouponStatusPipe,
    PaymodelPipe,
    PaytypePipe,
    DiscountTypePipe,
    DiscountStatusPipe,
    DisplayAreaPipe,
    DiscountCodeStatusPipe,
    RechargePricePipe,
    RechargeStatusPipe,
    ChannelMarkPipe,
    ChannelMarkPipe,
    TypePipe,
    StatusPipe,
    RechargePayTypePipe,
    RefundSourcePipe,
    RefundStatusPipe,
    PreOrderStatusPipe,
    ButtonPipe,
    DiscountPackageStatusPipe,
    ShowTypePipe,
    PriceShowPipe,
    EnergyTypePipe,
    CompanyAmountRecordTypePipe,
    CompanyAmountRecordSourceTypePipe,
    OilCardStatusPipe,
    OilCardBindStatusPipe,
    OilCardRecordTypePipe,
    OilCardRecordSourceTypePipe,
    GasStaffStatusPipe,
    OilTypePipe,
    RechargePlatformPipe,
    PriceStatusPipe,
    OilPriceTaskStatusPipe,
    OilPriceTaskExecutionTypePipe,
    OilPriceTaskPriceTypePipe,
    PayStatusPipe,
    ChlidRechargeStatusPipe,
    SourceTypePipe,
    GasClassGroupTaskStatusPipe,
    GasOrderStatusPipe,
    PlatformPipe,
    OrderOilStatusPipe,
    OrderStatusPipe,
    OrderPayTypePipe,
    OrderChildGoodsTypePipe,
];


@NgModule({
    imports: [
        CommonModule,
        FormsModule,
        ReactiveFormsModule,
        NgZorroAntdModule,
        NgxNeditorModule
    ],
    declarations: [
        ...PIPES,
        IntegralTypePipe,
        IntegralProductPipe,
    ],

    exports: [
        ...PIPES,
        IntegralTypePipe,
        IntegralProductPipe,
    ],
})

export class AppCommonModule {
    static forRoot() {
        return {
            ngModule: AppCommonModule,
            providers: [],
        };
    }
}
