'use server';
import { resolve } from '../../lib/server-container.js';
export async function listProjectMembers(projectId) {
    if (!projectId?.trim()) {
        return { error: 'Project ID is required' };
    }
    try {
        const useCase = resolve('ListProjectMembersUseCase');
        const result = await useCase.execute(projectId);
        if (!result.ok)
            return { error: result.error };
        return { members: result.members };
    }
    catch (error) {
        const message = error instanceof Error ? error.message : 'Failed to list members';
        return { error: message };
    }
}
