/**
 * Default Loop Transformer Plugin
 * Wraps the existing LoopTransformer
 */
import { LoopTransformer } from '../../transformer/loop-transformer.js';
export class DefaultLoopTransformerPlugin {
    name = 'atp-loop-transformer';
    version = '1.0.0';
    priority = 100;
    transformer;
    constructor(batchSizeThreshold) {
        this.transformer = new LoopTransformer(batchSizeThreshold);
    }
    getVisitor(config) {
        return {
            ForOfStatement: (path) => {
                this.transformer.transformForOfLoop(path);
            },
            WhileStatement: (path) => {
                this.transformer.transformWhileLoop(path);
            },
            ForStatement: (path) => {
                this.transformer.transformForLoop(path);
            },
        };
    }
    getMetadata() {
        return {
            loopCount: this.transformer.getTransformCount(),
        };
    }
    reset() {
        this.transformer.resetTransformCount();
    }
}
//# sourceMappingURL=loop-transformer-plugin.js.map