class InvalidArgsNamesException extends Error {
    constructor(name, method) {
        super(`An argument with the name '${name}' already exists in the method '${method}'`);
    }
}

class MethodArgsRegistry {
    constructor() {
        this.argumentsIndexMap = new Map();
    }
    get size() {
        return this.argumentsIndexMap.size;
    }
    getNameByIndex(index) {
        return this.argumentsIndexMap.get(index)?.key ?? null;
    }
    getIndexByKey(key) {
        return this.argumentsIndexMap.get(key)?.index ?? null;
    }
    putIndexByName(name, method, paramIndex) {
        const info = { key: name, index: paramIndex };
        this.checkDuplicateName(name, method);
        this.argumentsIndexMap.set(paramIndex, info);
        this.argumentsIndexMap.set(name, info);
    }
    checkDuplicateName(name, method) {
        if (this.argumentsIndexMap.has(name)) {
            throw new InvalidArgsNamesException(name, method);
        }
    }
}

/**
 * Generated bundle index. Do not edit.
 */

export { InvalidArgsNamesException, MethodArgsRegistry };
//# sourceMappingURL=angular-ru-cdk-runtime.mjs.map
