'use server';
import { resolve } from '../../lib/server-container.js';
export async function getBranchSyncStatus(featureId) {
    if (!featureId?.trim()) {
        return { success: false, error: 'Feature id is required' };
    }
    try {
        const useCase = resolve('GetBranchSyncStatusUseCase');
        const result = await useCase.execute(featureId);
        return {
            success: true,
            data: {
                ...result,
                checkedAt: new Date().toISOString(),
            },
        };
    }
    catch (error) {
        const message = error instanceof Error ? error.message : 'Failed to get branch sync status';
        return { success: false, error: message };
    }
}
