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