"use strict";
// ---------------------------------------------------------------------------
// Diagnostic Code Registry
//
// Single source of truth for all compiler error/warning codes.
// ---------------------------------------------------------------------------
Object.defineProperty(exports, "__esModule", { value: true });
exports.ErrorCodes = void 0;
function error(code, category) {
    return { code, severity: 'error', category };
}
function warning(code, category) {
    return { code, severity: 'warning', category };
}
/**
 * Centralized registry of all SimpleSteps compiler diagnostic codes.
 *
 * Usage: `ErrorCodes.Cfg.BreakOutsideLoop.code` → `'SS400'`
 */
class ErrorCodes {
    // ── Config / entry point (SS0xx) ──────────────────────────────────────
    static Config = class {
        static InvalidConfig = error('SS000', 'config');
    };
    // ── Discovery (SS1xx) ─────────────────────────────────────────────────
    static Discovery = class {
        static RecursiveCall = error('SS100', 'discovery');
    };
    // ── CFG construction (SS4xx) ──────────────────────────────────────────
    static Cfg = class {
        static BreakOutsideLoop = error('SS400', 'cfg');
        static ContinueOutsideLoop = error('SS401', 'cfg');
        static SwitchFallThrough = error('SS410', 'cfg');
        static PromiseAllNotArray = error('SS420', 'cfg');
        static PromiseRaceNotSupported = error('SS421', 'cfg');
        static InvalidMapCall = error('SS430', 'cfg');
        static InvalidDistributedMapCall = error('SS431', 'cfg');
    };
    // ── Expression mapping (SS5xx) ────────────────────────────────────────
    static Expr = class {
        static SpreadNotSupported = error('SS500', 'expression');
        static ComputedPropertyName = error('SS501', 'expression');
        static UncompilableExpression = error('SS502', 'expression');
        static UncompilableCondition = error('SS510', 'condition');
        static UncompilableComparison = error('SS511', 'condition');
        static UnsupportedOperator = error('SS512', 'condition');
        static UnresolvableIntrinsicArg = error('SS520', 'intrinsic');
        static MultiplyNotSupported = error('SS530', 'arithmetic');
        static DivideNotSupported = error('SS531', 'arithmetic');
        static ModuloNotSupported = error('SS532', 'arithmetic');
        static DynamicSubtraction = error('SS533', 'arithmetic');
        static JsonataOnlyFeature = error('SS540', 'expression');
    };
    // ── ASL generation (SS6xx) ────────────────────────────────────────────
    static Gen = class {
        static EmptyStateMachine = error('SS600', 'generation');
        static UnknownServiceMethod = error('SS610', 'generation');
        static MissingResourceArn = error('SS611', 'generation');
        static AwsSdkRequiresLiteral = error('SS612', 'generation');
    };
    // ── Helper function inlining (SS8xx) ─────────────────────────────────
    static Inlining = class {
        static UninlinableFunction = error('SS800', 'inlining');
        static HelperTooDeep = error('SS803', 'inlining');
        static HelperDestructuringParam = error('SS804', 'inlining');
        static HelperNotAwaited = error('SS805', 'inlining');
        static HelperReturnValue = error('SS806', 'inlining');
    };
    // ── Whole-program data flow (SS7xx) ───────────────────────────────────
    static DataFlow = class {
        static UnresolvableVariable = error('SS700', 'data-flow');
        static MutableVariable = error('SS701', 'data-flow');
        static UnresolvableImport = error('SS702', 'data-flow');
        static ImpureFunction = error('SS703', 'data-flow');
        static CircularImport = error('SS704', 'data-flow');
        static UnverifiedCdkExpression = warning('SS705', 'data-flow');
        static UnanalyzableImport = error('SS706', 'data-flow');
        static ComplexFunction = warning('SS707', 'data-flow');
        static SafeVarEscapeHatch = warning('SS708', 'data-flow');
        static PreferConst = warning('SS709', 'data-flow');
    };
}
exports.ErrorCodes = ErrorCodes;
//# sourceMappingURL=diagnosticCodes.js.map