import { writeFileSync, mkdirSync, existsSync } from 'node:fs';
import { join, dirname } from 'node:path';
import { renderSkill } from '../../../../modules/setup-wizard/services/skillTemplateRenderer.js';
export class SkillTemplateFileSystemGateway {
    deps;
    constructor(deps) {
        this.deps = deps;
    }
    writeSkill(projectPath, skillName, language) {
        const path = join(projectPath, '.claude', 'skills', skillName, 'SKILL.md');
        mkdirSync(dirname(path), { recursive: true });
        if (existsSync(path))
            return;
        writeFileSync(path, renderSkill(skillName, language), 'utf-8');
    }
    writeMcpJson(projectPath) {
        const path = join(projectPath, '.mcp.json');
        if (existsSync(path))
            return;
        const content = {
            mcpServers: {
                'review-progress': {
                    command: 'node',
                    args: [this.deps.mcpServerPath],
                },
            },
        };
        writeFileSync(path, JSON.stringify(content, null, 2), 'utf-8');
    }
}
//# sourceMappingURL=skillTemplate.fileSystem.gateway.js.map