import { ErrorPage } from "@components/UI/ErrorPage.tsx"; import Footer from "@components/UI/Footer.tsx"; import { Spinner } from "@components/UI/Spinner.tsx"; import { cn } from "@core/utils/cn.ts"; import type { LucideIcon } from "lucide-react"; import type React from "react"; import { ErrorBoundary } from "react-error-boundary"; export interface ActionItem { key: string; icon?: LucideIcon; iconClasses?: string; onClick: () => void; disabled?: boolean; isLoading?: boolean; ariaLabel?: string; label?: string; className?: string; } export interface PageLayoutProps { label: string; actions?: ActionItem[]; children: React.ReactNode; leftBar?: React.ReactNode; rightBar?: React.ReactNode; noPadding?: boolean; leftBarClassName?: string; rightBarClassName?: string; topBarClassName?: string; contentClassName?: string; } export const PageLayout = ({ label, actions, children, leftBar, rightBar, noPadding, leftBarClassName, rightBarClassName, topBarClassName, contentClassName, }: PageLayoutProps) => { return (
{/* Left Sidebar */} {leftBar && ( )}
{/* Header */}
{/* Header Content */}
{label}
{actions?.map((action) => { return ( ); })}
{children}
{/* Right Sidebar */} {rightBar && ( )}
); };