import * as i0 from '@angular/core';
import { Injectable, Pipe } from '@angular/core';

class ClonePipe {
    transform(value) {
        return this.clone(value);
    }
    clone(value) {
        let temp;
        if (value === null || typeof value !== 'object' || 'isActiveClone' in value) {
            return value;
        }
        if (value instanceof Date) {
            temp = new Date(value);
        }
        else {
            temp = value.constructor();
        }
        for (const key in value) {
            if (Object.prototype.hasOwnProperty.call(value, key)) {
                value.isActiveClone = null;
                temp[key] = this.clone(value[key]);
                delete value.isActiveClone;
            }
        }
        return temp;
    }
    static { this.ɵfac = function ClonePipe_Factory(t) { return new (t || ClonePipe)(); }; }
    static { this.ɵpipe = /*@__PURE__*/ i0.ɵɵdefinePipe({ name: "clone", type: ClonePipe, pure: true, standalone: true }); }
    static { this.ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: ClonePipe, factory: ClonePipe.ɵfac, providedIn: 'root' }); }
}
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ClonePipe, [{
        type: Injectable,
        args: [{
                providedIn: 'root'
            }]
    }, {
        type: Pipe,
        args: [{
                name: 'clone',
                standalone: true
            }]
    }], null, null); })();

/**
 * Generated bundle index. Do not edit.
 */

export { ClonePipe };
//# sourceMappingURL=ironsource-fusion-ui-pipes-clone.mjs.map
