import {notFound} from 'next/navigation';

/**
 * /tokens and /charts are internal design-system tools, not product surface.
 * Without this gate they appear in the production route table and are publicly
 * reachable. `dynamic = 'force-dynamic'` is required so the check runs per
 * request rather than being folded into a static prerender.
 */
export const dynamic = 'force-dynamic';

export default function DevLayout({children}: {children: React.ReactNode}) {
  if (process.env.NODE_ENV === 'production') {
    notFound();
  }
  return <>{children}</>;
}
