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
} from './pipes';
import { PreOrderStatusPipe } from './pipes/order/pre-order-status.pipe';
import { ButtonPipe } from './pipes/commons/button.pipe';
import { DiscountPackageStatusPipe } from './pipes/discount-package-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,
];


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

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

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