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