/** @type {import('next').NextConfig} */
const nextConfig = {
  reactStrictMode: true,
  // SaaS module loaded via iframe — keep output static-ish but App Router still works
  // with default settings. We disable SSR-by-default by using "use client" everywhere
  // (see src/app layout/page).
  output: 'standalone',
  typedRoutes: true,
  async headers() {
    // frame-ancestors is dynamically injected per-tenant in real deploys; here we
    // keep a permissive default for local dev. Production should set this from
    // platform config.
    return [
      {
        source: '/:path*',
        headers: [
          { key: 'X-Frame-Options', value: 'ALLOWALL' },
        ],
      },
    ];
  },
};

export default nextConfig;
