import type { Metadata } from "next";
import { IBM_Plex_Sans } from "next/font/google";
import "./globals.css";
// ----------------------
// BYU Header & Footer Components
// ----------------------
import Header from "@/components/BYU-Header/Header";
import Breadcrumb from "@/components/BYU-Header/Header-breadcrumb";
import HeaderSignin from "@/components/BYU-Header/Header-signin";
import HeaderSearch from "@/components/BYU-Header/Header-search";
import HeaderNavLink from "@/components/BYU-Header/Header-navlink";
import Footer from "@/components/BYU-Footer/Footer";
// ----------------------
// Authentication Provider (NextAuth)
// ----------------------
import { SessionProvider } from "next-auth/react";
// ----------------------
// Font Configuration
// - Imports IBM Plex Sans from Google Fonts
// - Assigns CSS variable for use in Tailwind styles
// ----------------------
const ibmPlexSans = IBM_Plex_Sans({
variable: "--font-ibm-plex-sans",
subsets: ["latin"],
weight: ["100", "200", "300", "400", "500", "600", "700"],
});
// ----------------------
// Metadata
// - Sets default
and
// - Used by Next.js for SEO and social previews
// ----------------------
export const metadata: Metadata = {
title: "Components Demo",
description: "Generated by Jamison Orton",
};
// ----------------------
// Root Layout
// - Wraps the entire app in a consistent structure
// - Provides the BYU Header and Footer around all pages
// - Includes SessionProvider so authentication is available globally
// ----------------------
export default function RootLayout({
children,
}: Readonly<{
children: React.ReactNode;
}>) {
return (
{/* =========================================================
SESSION PROVIDER
- Makes NextAuth session data available throughout the app
- Required for components like HeaderSignin that depend on login state
========================================================= */}
{/* =========================================================
HEADER
- Uses the custom component
- Accepts title, subtitle, breadcrumbs, rightItems, and navLinks props
========================================================= */}
components.
- Each breadcrumb takes `text` and `href`.
- Shown only on desktop within the header.
--------------------------------------------------------- */
breadcrumbs={[
,
,
]}
/* ---------------------------------------------------------
RIGHT ITEMS:
- Appears on the right side of the header (desktop)
- On mobile, these items collapse into the hamburger menu
- Here we use HeaderSignin and HeaderSearch
🔹 HeaderSignin → Handles login/logout via NextAuth
🔹 HeaderSearch → Expanding search input component
--------------------------------------------------------- */
rightItems={[, ]}
/* ---------------------------------------------------------
NAVIGATION LINKS:
- Array of components.
- Can be simple links or dropdowns with nested routes.
- Example below includes both link types.
--------------------------------------------------------- */
navLinks={[
// Simple top-level links
,
,
// Dropdown example with nested routes
,
]}
/>
{/* =========================================================
MAIN CONTENT AREA
- Displays all page-level content for your Next.js routes
- Stretches to fill remaining vertical space between Header and Footer
========================================================= */}
{children}
{/* =========================================================
FOOTER
- Uses component
- Can be customized independently (brand links, contact info, etc.)
========================================================= */}
);
}