'use server';
import { resolve } from '../../lib/server-container.js';
export async function createWorkItemRelation(input) {
    try {
        const useCase = resolve('CreateWorkItemRelationUseCase');
        const result = await useCase.execute(input);
        if (!result.ok)
            return { error: result.error };
        return { relation: result.relation };
    }
    catch (error) {
        const message = error instanceof Error ? error.message : 'Failed to create relation';
        return { error: message };
    }
}
