'use server';
import { resolve } from '../../lib/server-container.js';
export async function getCycleBurndown(cycleId) {
    if (!cycleId?.trim()) {
        return { error: 'Cycle ID is required' };
    }
    try {
        const useCase = resolve('GetCycleBurndownUseCase');
        const result = await useCase.execute(cycleId);
        if (!result.ok)
            return { error: result.error };
        return { data: result.data };
    }
    catch (error) {
        const message = error instanceof Error ? error.message : 'Failed to get cycle burndown';
        return { error: message };
    }
}
