import { jsx as _jsx } from "react/jsx-runtime";
// packages/ui/src/components/layout/PageContainer.tsx
/**
 * @fileoverview PageContainer - Semantic Layout Wrapper with Automatic SEO
 * @description Takes all available space from Layout parent, provides automatic meta tags
 * @package @donotdev/ui
 *
 * @version 0.0.1
 * @since 0.0.1
 * @author AMBROISE PARK Consulting
 */
import { Suspense } from 'react';
import { cn } from '@donotdev/components';
import DnDevErrorBoundary from '../../internal/common/DnDevErrorBoundary';
import RouteErrorFallback from '../../internal/common/RouteErrorFallback';
function PageContainerErrorFallback(props) {
    return (_jsx(Suspense, { fallback: _jsx("div", { children: "Loading error fallback..." }), children: _jsx(RouteErrorFallback, { ...props }) }));
}
/**
 * PageContainer - Layout wrapper with semantic width constraints
 *
 * DnDevLayout already handles:
 * - Main padding via --content-padding
 * - Sidebar/header spacing
 * - Responsive behavior
 *
 * @version 0.0.1
 * @since 0.0.1
 * @author AMBROISE PARK Consulting
 *
 * PageContainer provides:
 * - Semantic width constraints without additional padding
 * - Automatic spacing system using CSS variables
 *
 */
export const PageContainer = ({ variant = 'standard', density, className, children, centered = true, gapFirst = false, }) => {
    return (_jsx(DnDevErrorBoundary, { level: "route", fallback: PageContainerErrorFallback, children: _jsx("div", { className: cn('dndev-container', className), "data-variant": variant, "data-density": density, "data-centered": centered ? 'true' : 'false', "data-gap-first": gapFirst ? 'true' : undefined, children: children }) }));
};
