import { type ReactNode } from "react"; import { LiquidLayout, LiquidLayoutBottom, LiquidLayoutContent, LiquidLayoutLeft, LiquidLayoutRight, LiquidLayoutTop, } from "./LayoutSlots"; /** * Props for the LiquidLayoutView component */ interface LiquidLayoutViewProps { /** Content to display in the left slot */ left?: ReactNode; /** Content to display in the right slot */ right?: ReactNode; /** Content to display in the top slot */ top?: ReactNode; /** Content to display in the bottom slot */ bottom?: ReactNode; /** Main content to display in the center */ children?: ReactNode; /** Additional CSS classes to apply to the root element */ className?: string; /** Additional CSS classes to apply to the left slot */ leftClassName?: string; /** Additional CSS classes to apply to the right slot */ rightClassName?: string; /** Additional CSS classes to apply to the top slot */ topClassName?: string; /** Additional CSS classes to apply to the bottom slot */ bottomClassName?: string; /** Additional CSS classes to apply to the content slot */ contentClassName?: string; /** Hide all UI panels */ hideUI?: boolean; } /** * A flexible liquid layout component with slots for left, right, top, bottom, and center content. * The layout adapts to different content and screen sizes while maintaining proper positioning. * * @param props - The component props * @returns A liquid layout with positioned content slots */ export const LiquidLayoutView = ({ left, right, top, bottom, children, className, leftClassName, rightClassName, topClassName, bottomClassName, contentClassName, hideUI = false, }: LiquidLayoutViewProps) => { const uiVisibilityClass = hideUI ? "invisible pointer-events-none" : ""; return ( {children} {bottom && ( {bottom} )} {right && ( {right} )} {top && ( {top} )} {left && ( {left} )} ); };