"use strict";
/* Socket Lib - Built with rolldown */
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
const require_primordials_object = require('../../primordials/object.js');

//#region src/external-tools/opengrep/asset-names.ts
/**
* @file Upstream OpenGrep release asset-name mapping per `platform-arch`.
*   OpenGrep publishes raw binaries (no archive wrapper) for macOS and Linux,
*   and a zipped binary (`opengrep-core_windows_x86.zip` containing
*   `opengrep-core.exe`) for Windows. The `isArchive` flag tells the download
*   helper whether to extract or copy as-is.
*/
const OPENGREP_ASSET_MAP = require_primordials_object.ObjectFreeze({
	__proto__: null,
	"darwin-arm64": require_primordials_object.ObjectFreeze({
		__proto__: null,
		asset: "opengrep_osx_arm64",
		isArchive: false,
		binaryInArchive: void 0
	}),
	"darwin-x64": require_primordials_object.ObjectFreeze({
		__proto__: null,
		asset: "opengrep_osx_x86",
		isArchive: false,
		binaryInArchive: void 0
	}),
	"linux-arm64": require_primordials_object.ObjectFreeze({
		__proto__: null,
		asset: "opengrep_manylinux_aarch64",
		isArchive: false,
		binaryInArchive: void 0
	}),
	"linux-x64": require_primordials_object.ObjectFreeze({
		__proto__: null,
		asset: "opengrep_manylinux_x86",
		isArchive: false,
		binaryInArchive: void 0
	}),
	"win-x64": require_primordials_object.ObjectFreeze({
		__proto__: null,
		asset: "opengrep-core_windows_x86.zip",
		isArchive: true,
		binaryInArchive: "opengrep-core.exe"
	})
});
function getOpengrepAssetEntry(platformArch) {
	return OPENGREP_ASSET_MAP[platformArch];
}
/**
* Build the GitHub release-asset download URL for an upstream OpenGrep binary.
* Returns `undefined` when no entry exists for the requested platform-arch.
*
* Reference: https://github.com/opengrep/opengrep/releases.
*/
function getOpengrepDownloadUrl(opts) {
	const { platformArch, version } = opts;
	const entry = OPENGREP_ASSET_MAP[platformArch];
	if (!entry) return;
	return `https://github.com/opengrep/opengrep/releases/download/v${version}/` + entry.asset;
}

//#endregion
exports.OPENGREP_ASSET_MAP = OPENGREP_ASSET_MAP;
exports.getOpengrepAssetEntry = getOpengrepAssetEntry;
exports.getOpengrepDownloadUrl = getOpengrepDownloadUrl;