export function mergeSandboxProfiles(current, next) {
    if (!current) {
        return next;
    }
    const denyNetwork = sandboxProfileDeniesNetwork(current) || sandboxProfileDeniesNetwork(next);
    const denyWrites = sandboxProfileDeniesWrites(current) || sandboxProfileDeniesWrites(next);
    if (denyNetwork && denyWrites) {
        return "no-network-no-write";
    }
    if (denyNetwork) {
        return "no-network";
    }
    if (denyWrites) {
        return "no-write";
    }
    return "none";
}
function sandboxProfileDeniesNetwork(profile) {
    return profile === "no-network" || profile === "no-network-no-write";
}
function sandboxProfileDeniesWrites(profile) {
    return profile === "no-write" || profile === "no-network-no-write";
}
//# sourceMappingURL=sandbox-profile.js.map