"use client"; import { useState } from "react"; import { Panel, PanelGroup } from "react-resizable-panels"; import { PERSISTENCE_KEY } from "@/config/persistence-keys"; import { toolGroups } from "@/config/tools"; import { DiffEditor } from "@/components/ui/diff-editor"; import { Editor } from "@/components/ui/editor"; import * as Button from "@/components/buttons"; import { Configuration } from "@/components/configuration"; import { Configurations } from "@/components/configurations"; import { ControlMenu } from "@/components/control-menu"; import * as icons from "@/components/icons"; import { LabeledSwitch } from "@/components/labeled-switch"; import { PageRootSection } from "@/components/page-root-section"; import { PageSection } from "@/components/page-section"; import { PanelResizeHandle } from "@/components/panel-resize-handler"; /** No particular reason for these sizes, just feels like a good balance */ const VERTICAL_PANEL_MAX_SIZE = 80; const HORIZONTAL_PANEL_MAX_SIZE = 90; const PANEL_FULL_SIZE = 100; export default function Page() { const [input1, setInput1] = useState("Hello world"); const [input2, setInput2] = useState("Hello, World!"); const [diffFullHeight, setDiffFullHeight] = useState(false); const [inlineMode, setInlineMode] = useState(false); const diffPanelMaxSize = diffFullHeight ? PANEL_FULL_SIZE : VERTICAL_PANEL_MAX_SIZE; const clearInput1 = () => setInput1(""); const clearInput2 = () => setInput2(""); const toggleFullHeight = () => setDiffFullHeight(prev => !prev); const inlineModeConfig = ( } title="Inline mode" control={ } /> ); const input1Control = ( , , , ]} /> ); const input2Control = ( , , , ]} /> ); const diffControl = ( , ]} /> ); const hiddenInFullHeightMode = diffFullHeight ? "hidden" : ""; return ( ); }