'use server';
import { resolve } from '../../lib/server-container.js';
export async function listWorkItemRelations(workItemId) {
    if (!workItemId?.trim()) {
        return { error: 'Work item ID is required' };
    }
    try {
        const useCase = resolve('ListWorkItemRelationsUseCase');
        const relations = await useCase.execute(workItemId);
        return { relations };
    }
    catch (error) {
        const message = error instanceof Error ? error.message : 'Failed to list relations';
        return { error: message };
    }
}
