"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.addCustom = addCustom;
function addCustom(testCases, injectVar, config, strategyId = 'custom') {
    // Extract variant from strategy ID (e.g., 'custom:aggressive' -> 'aggressive')
    const variant = strategyId.includes(':') ? strategyId.split(':')[1] : '';
    const displayName = variant ? `Custom:${variant}` : 'Custom';
    return testCases.map((testCase) => {
        const originalText = String(testCase.vars[injectVar]);
        return {
            ...testCase,
            provider: {
                id: strategyId === 'custom' ? 'trusys:redteam:custom' : `trusys:redteam:${strategyId}`,
                config: {
                    injectVar,
                    variant,
                    ...config,
                },
            },
            assert: testCase.assert?.map((assertion) => ({
                ...assertion,
                metric: `${assertion.metric}/${displayName}`,
            })),
            metadata: {
                ...testCase.metadata,
                strategyId,
                originalText,
            },
        };
    });
}
//# sourceMappingURL=custom.js.map