'use server';
import { resolve } from '../../lib/server-container.js';
export async function rebaseFeature(featureId) {
    if (!featureId?.trim()) {
        return { success: false, error: 'Feature id is required' };
    }
    try {
        const useCase = resolve('RebaseFeatureOnMainUseCase');
        await useCase.execute(featureId);
        return { success: true };
    }
    catch (error) {
        const message = error instanceof Error ? error.message : 'Failed to rebase feature';
        return { success: false, error: message };
    }
}
