"use strict";
/**
 * Archive Extractor
 * Facade for tar.gz and zip archive extraction.
 */
Object.defineProperty(exports, "__esModule", { value: true });
exports.extractArchive = exports.extractZip = exports.extractTarGz = void 0;
const platform_detector_1 = require("../binary/platform-detector");
const tar_extractor_1 = require("./tar-extractor");
const zip_extractor_1 = require("./zip-extractor");
// Re-export for convenience
var tar_extractor_2 = require("./tar-extractor");
Object.defineProperty(exports, "extractTarGz", { enumerable: true, get: function () { return tar_extractor_2.extractTarGz; } });
var zip_extractor_2 = require("./zip-extractor");
Object.defineProperty(exports, "extractZip", { enumerable: true, get: function () { return zip_extractor_2.extractZip; } });
/**
 * Extract archive based on extension
 */
async function extractArchive(archivePath, destDir, extension, verbose = false, backend = platform_detector_1.DEFAULT_BACKEND) {
    if (extension === 'tar.gz') {
        await (0, tar_extractor_1.extractTarGz)(archivePath, destDir, verbose, backend);
    }
    else {
        await (0, zip_extractor_1.extractZip)(archivePath, destDir, verbose, backend);
    }
}
exports.extractArchive = extractArchive;
//# sourceMappingURL=extractor.js.map