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