'use server';
import { resolve } from '../../lib/server-container.js';
export async function archiveFeature(featureId) {
    if (!featureId?.trim()) {
        return { error: 'id is required' };
    }
    try {
        const archiveFeatureUseCase = resolve('ArchiveFeatureUseCase');
        const feature = await archiveFeatureUseCase.execute(featureId);
        return { feature };
    }
    catch (error) {
        const message = error instanceof Error ? error.message : 'Failed to archive feature';
        return { error: message };
    }
}
