'use server';
import { resolve } from '../../lib/server-container.js';
export async function addProjectMember(input) {
    try {
        const useCase = resolve('AddProjectMemberUseCase');
        const result = await useCase.execute(input);
        if (!result.ok)
            return { error: result.error };
        return { member: result.member };
    }
    catch (error) {
        const message = error instanceof Error ? error.message : 'Failed to add member';
        return { error: message };
    }
}
