'use server';
import { resolve } from '../../lib/server-container.js';
/**
 * Thin server-action wrapper around CreateProjectUseCase. All slug rules,
 * existence checks, filesystem mutations, and git bootstrapping live in the
 * use case + IProjectScaffoldService adapter — see:
 *
 *   packages/core/src/application/use-cases/projects/create-project.use-case.ts
 *   packages/core/src/infrastructure/services/project-scaffold/fs-project-scaffold.service.ts
 */
export async function createProjectFolder(name) {
    const useCase = resolve('CreateProjectUseCase');
    const result = await useCase.execute({ name });
    if (!result.ok) {
        return { ok: false, error: result.error };
    }
    return { ok: true, path: result.path };
}
