"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.uninstallDarwinWireGuardLaunchDaemon = exports.shellQuote = exports.setWireGuardTunnelState = exports.resolveWireGuardRuntime = exports.resolveWireGuardConnectionRuntime = exports.renderHdoClientWireGuardConfig = exports.repairWireGuardTunnelRoutes = exports.normalizeCidr = exports.localCidrsForAllowedIpExclusion = exports.installDarwinWireGuardLaunchDaemon = exports.HDO_MESH_ROUTE_CIDRS = exports.HDO_MESH_DEFAULTS = exports.getWireGuardTunnelStatus = exports.getDarwinWireGuardLaunchDaemonStatus = exports.generateWireGuardKeyPairWithCli = exports.excludeLocalRoutesFromAllowedIps = exports.buildHdoRouteProbe = void 0;
function loadWireGuardCore() {
    try {
        // eslint-disable-next-line @typescript-eslint/no-require-imports
        return require('@qpjoy/electron-core-wireguard');
    }
    catch (primaryErr) {
        try {
            // Compatibility for older marketplace installers that unpack HDO's
            // tarball without installing its npm dependency tree.
            // eslint-disable-next-line @typescript-eslint/no-require-imports
            return require('./vendor/electron-core-wireguard');
        }
        catch {
            throw primaryErr;
        }
    }
}
const core = loadWireGuardCore();
exports.buildHdoRouteProbe = core.buildHdoRouteProbe;
exports.excludeLocalRoutesFromAllowedIps = core.excludeLocalRoutesFromAllowedIps;
exports.generateWireGuardKeyPairWithCli = core.generateWireGuardKeyPairWithCli;
exports.getDarwinWireGuardLaunchDaemonStatus = core.getDarwinWireGuardLaunchDaemonStatus;
exports.getWireGuardTunnelStatus = core.getWireGuardTunnelStatus;
exports.HDO_MESH_DEFAULTS = core.HDO_MESH_DEFAULTS;
exports.HDO_MESH_ROUTE_CIDRS = core.HDO_MESH_ROUTE_CIDRS;
exports.installDarwinWireGuardLaunchDaemon = core.installDarwinWireGuardLaunchDaemon;
exports.localCidrsForAllowedIpExclusion = core.localCidrsForAllowedIpExclusion;
exports.normalizeCidr = core.normalizeCidr;
exports.repairWireGuardTunnelRoutes = core.repairWireGuardTunnelRoutes;
exports.renderHdoClientWireGuardConfig = core.renderHdoClientWireGuardConfig;
exports.resolveWireGuardConnectionRuntime = core.resolveWireGuardConnectionRuntime;
exports.resolveWireGuardRuntime = core.resolveWireGuardRuntime;
exports.setWireGuardTunnelState = core.setWireGuardTunnelState;
exports.shellQuote = core.shellQuote;
exports.uninstallDarwinWireGuardLaunchDaemon = core.uninstallDarwinWireGuardLaunchDaemon;
