import type { ClaudeCodeSettings, PermissionTemplate, PermissionMergePlan, PermissionMergeResult } from '../../types/permissions-config.js';
/**
 * Returns true if `candidate` would be an upgrade over `current`.
 * 'bypassPermissions' > 'acceptEdits' > 'default'.
 * Unknown modes are treated as lowest priority.
 */
export declare function shouldUpgradeDefaultMode(current: string, candidate: string): boolean;
/** Deduplicate an array of strings while preserving order of first occurrence. */
export declare function dedupeRules(rules: string[]): string[];
/**
 * Compute a PermissionMergePlan (what would change) without modifying anything.
 *
 * @param existing - Current ClaudeCodeSettings (may have empty/missing permissions)
 * @param template - The target template for the chosen mode
 * @param extraDeny - Additional deny rules from stack detection
 */
export declare function planMerge(existing: ClaudeCodeSettings, template: PermissionTemplate, extraDeny: string[]): PermissionMergePlan;
/**
 * Apply a PermissionMergePlan to an existing ClaudeCodeSettings object, returning the merged result.
 * The input object is NOT mutated — a new object is returned.
 */
export declare function applyPlan(existing: ClaudeCodeSettings, plan: PermissionMergePlan): ClaudeCodeSettings;
/**
 * Idempotent merge: compute plan and (if changes needed) apply it.
 *
 * @param existing - Current settings object (may be empty `{}`)
 * @param template - Template for the chosen mode
 * @param extraDeny - Stack-specific deny rules to add
 */
export declare function mergePermissions(existing: ClaudeCodeSettings, template: PermissionTemplate, extraDeny: string[]): PermissionMergeResult;
//# sourceMappingURL=merger.d.ts.map