import * as i0 from '@angular/core';
import { PipeTransform } from '@angular/core';
import { NzSafeAny } from 'ng-zorro-antd/core/types';
import { DomSanitizer, SafeHtml, SafeStyle, SafeUrl, SafeResourceUrl } from '@angular/platform-browser';

/**
 * Use of this source code is governed by an MIT-style license that can be
 * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE
 */

type AggregateMethod = 'sum' | 'max' | 'min' | 'avg';
declare class NzAggregatePipe implements PipeTransform {
    transform(value: number[], method: AggregateMethod): undefined | number;
    static ɵfac: i0.ɵɵFactoryDeclaration<NzAggregatePipe, never>;
    static ɵpipe: i0.ɵɵPipeDeclaration<NzAggregatePipe, "nzAggregate", true>;
}

/**
 * Use of this source code is governed by an MIT-style license that can be
 * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE
 */

type ByteUnit = 'B' | 'kB' | 'KB' | 'MB' | 'GB' | 'TB';
declare class NzBytesPipe implements PipeTransform {
    static formats: Record<ByteUnit, {
        max: number;
        prev?: ByteUnit;
    }>;
    transform(input: NzSafeAny, decimal?: number, from?: ByteUnit, to?: ByteUnit): NzSafeAny;
    static formatResult(result: number, unit: string): string;
    static calculateResult(format: {
        max: number;
        prev?: ByteUnit;
    }, bytes: number): number;
    static ɵfac: i0.ɵɵFactoryDeclaration<NzBytesPipe, never>;
    static ɵpipe: i0.ɵɵPipeDeclaration<NzBytesPipe, "nzBytes", true>;
}

/**
 * Use of this source code is governed by an MIT-style license that can be
 * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE
 */

declare class NzToCssUnitPipe implements PipeTransform {
    transform(value: number | string, defaultUnit?: string): string;
    static ɵfac: i0.ɵɵFactoryDeclaration<NzToCssUnitPipe, never>;
    static ɵpipe: i0.ɵɵPipeDeclaration<NzToCssUnitPipe, "nzToCssUnit", true>;
}

/**
 * Use of this source code is governed by an MIT-style license that can be
 * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE
 */

declare class NzEllipsisPipe implements PipeTransform {
    transform(value: NzSafeAny, length?: number, suffix?: string): NzSafeAny;
    static ɵfac: i0.ɵɵFactoryDeclaration<NzEllipsisPipe, never>;
    static ɵpipe: i0.ɵɵPipeDeclaration<NzEllipsisPipe, "nzEllipsis", true>;
}

/**
 * Use of this source code is governed by an MIT-style license that can be
 * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE
 */

declare class NzSanitizerPipe implements PipeTransform {
    protected sanitizer: DomSanitizer;
    transform(value: NzSafeAny, type: 'html'): SafeHtml;
    transform(value: NzSafeAny, type: 'style'): SafeStyle;
    transform(value: NzSafeAny, type: 'url'): SafeUrl;
    transform(value: NzSafeAny, type: 'resourceUrl'): SafeResourceUrl;
    static ɵfac: i0.ɵɵFactoryDeclaration<NzSanitizerPipe, never>;
    static ɵpipe: i0.ɵɵPipeDeclaration<NzSanitizerPipe, "nzSanitizer", true>;
}

/**
 * Use of this source code is governed by an MIT-style license that can be
 * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE
 */

declare class NzTrimPipe implements PipeTransform {
    transform(text: string): string;
    static ɵfac: i0.ɵɵFactoryDeclaration<NzTrimPipe, never>;
    static ɵpipe: i0.ɵɵPipeDeclaration<NzTrimPipe, "nzTrim", true>;
}

declare class NzPipesModule {
    static ɵfac: i0.ɵɵFactoryDeclaration<NzPipesModule, never>;
    static ɵmod: i0.ɵɵNgModuleDeclaration<NzPipesModule, never, [typeof NzToCssUnitPipe, typeof NzSanitizerPipe, typeof NzTrimPipe, typeof NzBytesPipe, typeof NzAggregatePipe, typeof NzEllipsisPipe], [typeof NzToCssUnitPipe, typeof NzSanitizerPipe, typeof NzTrimPipe, typeof NzBytesPipe, typeof NzAggregatePipe, typeof NzEllipsisPipe]>;
    static ɵinj: i0.ɵɵInjectorDeclaration<NzPipesModule>;
}

export { NzAggregatePipe, NzBytesPipe, NzEllipsisPipe, NzPipesModule, NzSanitizerPipe, NzToCssUnitPipe, NzTrimPipe };
export type { AggregateMethod, ByteUnit };
