import type { Metadata } from "next";
import { PortalSessionProvider } from "@/features/portal/portal-session";

export const metadata: Metadata = {
  title: "Store portal",
  robots: { index: false, follow: false },
};

/**
 * Everything under /portal belongs to a shop's own staff, not to our back office, so it gets its
 * own session. The back office's `SessionProvider` is still mounted above (it is in the root
 * providers) but stays idle here: it only acts when an admin token exists.
 */
export default function PortalLayout({ children }: { children: React.ReactNode }) {
  return <PortalSessionProvider>{children}</PortalSessionProvider>;
}
