export function readWrfcConfig(configManager) {
    const wrfcConfig = configManager.getCategory('wrfc');
    return {
        scoreThreshold: typeof configManager.get('wrfc.scoreThreshold') === 'number'
            ? configManager.get('wrfc.scoreThreshold')
            : wrfcConfig?.scoreThreshold ?? 9.9,
        maxFixAttempts: typeof configManager.get('wrfc.maxFixAttempts') === 'number'
            ? configManager.get('wrfc.maxFixAttempts')
            : wrfcConfig?.maxFixAttempts ?? 3,
        autoCommit: typeof configManager.get('wrfc.autoCommit') === 'boolean'
            ? configManager.get('wrfc.autoCommit')
            : wrfcConfig?.autoCommit ?? false,
        gates: Array.isArray(wrfcConfig?.gates) ? wrfcConfig.gates : [],
    };
}
export function getWrfcScoreThreshold(configManager) {
    return readWrfcConfig(configManager).scoreThreshold ?? 9.9;
}
export function getWrfcMaxFixAttempts(configManager) {
    return readWrfcConfig(configManager).maxFixAttempts ?? 3;
}
export function getWrfcAutoCommit(configManager) {
    return readWrfcConfig(configManager).autoCommit ?? false;
}
export function getEnabledWrfcGates(configManager) {
    return readWrfcConfig(configManager).gates.filter((gate) => gate.enabled);
}
