import { o as isNodeRoleMethod } from "./method-scopes-C5q5fl4b.js";
//#region src/gateway/role-policy.ts
function parseGatewayRole(roleRaw) {
	if (roleRaw === "operator" || roleRaw === "node") return roleRaw;
	return null;
}
function roleCanSkipDeviceIdentity(role, sharedAuthOk) {
	return role === "operator" && sharedAuthOk;
}
function isRoleAuthorizedForMethod(role, method) {
	if (isNodeRoleMethod(method)) return role === "node";
	return role === "operator";
}
//#endregion
export { parseGatewayRole as n, roleCanSkipDeviceIdentity as r, isRoleAuthorizedForMethod as t };
