"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.isValidUrl = isValidUrl;
exports.isValidEnvName = isValidEnvName;
exports.isValidGuid = isValidGuid;
exports.isUniqueEnvNames = isUniqueEnvNames;
const ENV_NAME_REGEX = /^[a-zA-Z_]+[a-zA-Z0-9_]*$/;
const GUID_REGEX = /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/;
function isValidUrl(url) {
    try {
        const tempUrl = new URL(url);
        if (tempUrl.protocol === "https:") {
            return true;
        }
    }
    catch {
        return false;
    }
    return false;
}
function isValidEnvName(name) {
    return ENV_NAME_REGEX.test(name);
}
function isValidGuid(value) {
    return GUID_REGEX.test(value);
}
function isUniqueEnvNames(secretInputs) {
    const envNames = [...new Set(secretInputs.map((s) => s.outputEnvName))];
    return envNames.length === secretInputs.length;
}
