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