/**
 * Generic approvals policy resolution rooted in persisted ActionsSettings.
 *
 * Notes:
 * - This answers “should this action be routed through approvals on this surface?”
 * - It does not decide enablement (use `isActionEnabledByActionsSettings` separately).
 * - Missing/unknown surfaces fail closed (no approval requirement).
 */
export function isApprovalRequiredByActionsSettings(actionId, settings, ctx) {
    const surface = ctx?.surface ?? null;
    if (!surface)
        return false;
    const override = settings?.actions?.[actionId];
    const required = override?.approvalRequiredSurfaces ?? [];
    return Array.isArray(required) && required.includes(surface);
}
//# sourceMappingURL=actionApprovalPolicy.js.map