import { Injectable, Pipe } from '@angular/core';
import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';
import { mergeClone } from '../utils/deep-merge';
import * as i0 from "@angular/core";
export class MergeClonePipe {
    constructor() {
    }
    transform(data, defaultData) {
        if (data == null)
            return data;
        return mergeClone(defaultData, data);
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: MergeClonePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
    static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "17.3.5", ngImport: i0, type: MergeClonePipe, name: "mergeClone" }); }
    static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: MergeClonePipe }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: MergeClonePipe, decorators: [{
            type: Pipe,
            args: [{
                    name: 'mergeClone'
                }]
        }, {
            type: Injectable
        }], ctorParameters: () => [] });
export class MergeClonePipeModule {
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: MergeClonePipeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
    static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.5", ngImport: i0, type: MergeClonePipeModule, declarations: [MergeClonePipe], imports: [CommonModule], exports: [MergeClonePipe] }); }
    static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: MergeClonePipeModule, imports: [CommonModule] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: MergeClonePipeModule, decorators: [{
            type: NgModule,
            args: [{
                    imports: [
                        CommonModule
                    ],
                    declarations: [MergeClonePipe],
                    exports: [MergeClonePipe],
                }]
        }] });
//# sourceMappingURL=data:application/json;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