'use server';
import { resolve } from '../../lib/server-container.js';
export async function deleteApplication(id) {
    if (!id?.trim()) {
        return { error: 'Application ID is required' };
    }
    try {
        const useCase = resolve('DeleteApplicationUseCase');
        await useCase.execute(id);
        return {};
    }
    catch (error) {
        const message = error instanceof Error ? error.message : 'Failed to delete application';
        return { error: message };
    }
}
