'use server';
import { resolve } from '../../lib/server-container.js';
export async function getPmProject(projectIdOrSlug) {
    if (!projectIdOrSlug?.trim()) {
        return { error: 'Project ID or slug is required' };
    }
    try {
        const useCase = resolve('GetPmProjectUseCase');
        const result = await useCase.execute(projectIdOrSlug);
        if (!result.ok)
            return { error: result.error };
        return { project: result.project };
    }
    catch (error) {
        const message = error instanceof Error ? error.message : 'Failed to get project';
        return { error: message };
    }
}
