'use server';
import { resolve } from '../../lib/server-container.js';
export async function updatePmProject(projectId, input) {
    if (!projectId?.trim()) {
        return { error: 'Project ID is required' };
    }
    try {
        const useCase = resolve('UpdatePmProjectUseCase');
        const result = await useCase.execute(projectId, input);
        if (!result.ok)
            return { error: result.error };
        return {};
    }
    catch (error) {
        const message = error instanceof Error ? error.message : 'Failed to update project';
        return { error: message };
    }
}
