2025-04-06 09:34:07 +00:00
|
|
|
"use client";
|
|
|
|
|
|
|
|
import {
|
2025-04-13 03:56:01 +00:00
|
|
|
BotIcon,
|
|
|
|
CircleCheckBigIcon,
|
|
|
|
FileTextIcon,
|
|
|
|
FlaskConicalIcon,
|
|
|
|
SquareCheckIcon,
|
|
|
|
SquarePenIcon,
|
|
|
|
} from "lucide-react";
|
|
|
|
import Dockview from "@/components/dockview";
|
|
|
|
import { useDockviewStore } from "@/stores/dockview";
|
|
|
|
|
|
|
|
interface ProblemPageProps {
|
|
|
|
Description: React.ReactNode;
|
|
|
|
Solutions: React.ReactNode;
|
|
|
|
Submissions: React.ReactNode;
|
2025-04-13 14:42:08 +00:00
|
|
|
Details: React.ReactNode;
|
2025-04-13 03:56:01 +00:00
|
|
|
Code: React.ReactNode;
|
|
|
|
Testcase: React.ReactNode;
|
|
|
|
Bot: React.ReactNode;
|
|
|
|
}
|
|
|
|
|
|
|
|
export default function ProblemPage({
|
2025-04-06 09:34:07 +00:00
|
|
|
Description,
|
|
|
|
Solutions,
|
|
|
|
Submissions,
|
2025-04-13 14:42:08 +00:00
|
|
|
Details,
|
2025-04-13 03:56:01 +00:00
|
|
|
Code,
|
2025-04-06 09:34:07 +00:00
|
|
|
Testcase,
|
2025-04-13 03:56:01 +00:00
|
|
|
Bot,
|
|
|
|
}: ProblemPageProps) {
|
2025-04-12 02:47:23 +00:00
|
|
|
const { setApi } = useDockviewStore();
|
2025-04-06 09:34:07 +00:00
|
|
|
return (
|
2025-04-13 03:56:01 +00:00
|
|
|
<Dockview
|
2025-04-06 09:34:07 +00:00
|
|
|
storageKey="dockview:problem"
|
2025-04-12 02:47:23 +00:00
|
|
|
onApiReady={setApi}
|
2025-04-13 03:56:01 +00:00
|
|
|
options={[
|
|
|
|
{
|
|
|
|
id: "Description",
|
|
|
|
component: "Description",
|
|
|
|
tabComponent: "Description",
|
|
|
|
title: "Description",
|
|
|
|
params: {
|
|
|
|
icon: FileTextIcon,
|
|
|
|
content: Description,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
id: "Solutions",
|
|
|
|
component: "Solutions",
|
|
|
|
tabComponent: "Solutions",
|
|
|
|
title: "Solutions",
|
|
|
|
params: {
|
|
|
|
icon: FlaskConicalIcon,
|
|
|
|
content: Solutions,
|
|
|
|
},
|
|
|
|
position: {
|
|
|
|
referencePanel: "Description",
|
|
|
|
direction: "within",
|
|
|
|
},
|
|
|
|
inactive: true,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
id: "Submissions",
|
|
|
|
component: "Submissions",
|
|
|
|
tabComponent: "Submissions",
|
|
|
|
title: "Submissions",
|
|
|
|
params: {
|
|
|
|
icon: CircleCheckBigIcon,
|
|
|
|
content: Submissions,
|
|
|
|
},
|
|
|
|
position: {
|
|
|
|
referencePanel: "Solutions",
|
|
|
|
direction: "within",
|
|
|
|
},
|
|
|
|
inactive: true,
|
|
|
|
},
|
2025-04-13 14:42:08 +00:00
|
|
|
{
|
|
|
|
id: "Details",
|
|
|
|
component: "Details",
|
|
|
|
tabComponent: "Details",
|
|
|
|
title: "Details",
|
|
|
|
params: {
|
|
|
|
icon: CircleCheckBigIcon,
|
|
|
|
content: Details,
|
|
|
|
autoAdd: false,
|
|
|
|
},
|
|
|
|
},
|
2025-04-13 03:56:01 +00:00
|
|
|
{
|
|
|
|
id: "Code",
|
|
|
|
component: "Code",
|
|
|
|
tabComponent: "Code",
|
|
|
|
title: "Code",
|
|
|
|
params: {
|
|
|
|
icon: SquarePenIcon,
|
|
|
|
content: Code,
|
|
|
|
},
|
|
|
|
position: {
|
|
|
|
referencePanel: "Submissions",
|
|
|
|
direction: "right",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
id: "Testcase",
|
|
|
|
component: "Testcase",
|
|
|
|
tabComponent: "Testcase",
|
|
|
|
title: "Testcase",
|
|
|
|
params: {
|
|
|
|
icon: SquareCheckIcon,
|
|
|
|
content: Testcase,
|
|
|
|
},
|
|
|
|
position: {
|
|
|
|
referencePanel: "Code",
|
|
|
|
direction: "below",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
id: "Bot",
|
|
|
|
component: "Bot",
|
|
|
|
tabComponent: "Bot",
|
|
|
|
title: "Bot",
|
|
|
|
params: {
|
|
|
|
icon: BotIcon,
|
|
|
|
content: Bot,
|
|
|
|
autoAdd: false,
|
|
|
|
},
|
|
|
|
position: {
|
|
|
|
direction: "right",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
]}
|
2025-04-06 09:34:07 +00:00
|
|
|
/>
|
|
|
|
);
|
|
|
|
}
|