import { jsx as _jsx } from "react/jsx-runtime";
import { resolve } from '../../../../lib/server-container.js';
import { ProjectSettingsClient } from './project-settings-client.js';
export const dynamic = 'force-dynamic';
export default async function ProjectSettingsPage({ params }) {
    const { slug } = await params;
    const projectUseCase = resolve('GetPmProjectUseCase');
    const result = await projectUseCase.execute(slug);
    if (!result.ok) {
        return (_jsx("div", { className: "flex h-full items-center justify-center p-6", children: _jsx("p", { className: "text-muted-foreground text-sm", children: result.error }) }));
    }
    const project = result.project;
    const [states, labels, membersResult] = await Promise.all([
        resolve('ManageWorkItemStatesUseCase').list(project.id),
        resolve('ManageLabelsUseCase').list(project.id),
        resolve('ListProjectMembersUseCase').execute(project.id),
    ]);
    const members = membersResult.ok ? membersResult.members : [];
    return (_jsx("div", { className: "flex h-full flex-col p-6", children: _jsx(ProjectSettingsClient, { project: project, states: states, labels: labels, members: members }) }));
}
