import { jsx as _jsx } from "react/jsx-runtime";
import { resolve } from '../../../../../lib/server-container.js';
import { RepositoryDrawerClient } from '../../../../../components/common/control-center-drawer/repository-drawer-client.js';
/** Skip static pre-rendering since we need runtime DI container. */
export const dynamic = 'force-dynamic';
export default async function RepositoryDrawerPage({ params }) {
    const { repositoryId } = await params;
    try {
        const repoRepository = resolve('IRepositoryRepository');
        const repository = await repoRepository.findById(repositoryId);
        if (!repository)
            return null;
        return (_jsx(RepositoryDrawerClient, { data: { name: repository.name, repositoryPath: repository.path, id: repository.id } }));
    }
    catch {
        return null;
    }
}
