import type { Metadata } from "next";
import NavBar from "@/components/web/Nav";
import { getProfile } from "@/lib/actions/profile";

export const metadata: Metadata = {
  title: "Library | E-Library",
  description: "User portal for Federal Polytechnic Bali E-Library: browse books, loans, and profile settings.",
};

export default async function UsersLayout({
  children,
}: {
  children: React.ReactNode;
}) {
  const user = (await getProfile()).data;

  return (
    <>
      <NavBar user={user as any} />
      {children}
    </>
  );
}
