import React from 'react';
import { Flex, Layout, Row, Col } from 'antd';
import Navigation from '@/components/layout/Navigation';
// This layout component is an alternative layout for Next.js routes
// where the default layout from app/layout.tsx is intentionally skipped.
// It is useful when you define certain paths to avoid the global layout (e.g., login pages, special full-screen pages).
type AltLayoutProps = {
header?: React.ReactNode; // Optional header component
children?: React.ReactNode; // Main content of the page
footer?: React.ReactNode; // Optional footer component (defaults to )
};
// Functional component definition with default props set
const AltLayout: React.FC = ({
header = <>>, // Empty fragment by default if no header passed
children = <>>, // Empty fragment by default if no children passed
footer = // Defaults to Navigation if no footer is passed
}: AltLayoutProps) => {
return (
// Top-level Layout from Ant Design
{/* Full vertical height flex container */}
{/* Header Row (if provided) */}
{header}
{/* Content Row: grows to take available space, scrollable vertically only */}
{/* Content wrapper - handles chat body or main content scroll */}
{children}
{/* Footer section - typically bottom navigation */}
{footer}
);
};
export default AltLayout;