import type { Metadata } from 'next';
import { notFound } from 'next/navigation';
import DemoClient from './DemoClient';

const DEMO_MODE_ON = process.env.NEXT_PUBLIC_DEMO_MODE === 'on';

const TITLE = 'Live Demo — RestroAgent';
const DESCRIPTION =
  'Explore the full RestroAgent restaurant + admin platform with seeded demo data. One click signs you in.';
const OG_IMAGE = '/assets/images/app_logo.png';

export const metadata: Metadata = {
  title: TITLE,
  description: DESCRIPTION,
  robots: { index: false, follow: false },
  openGraph: {
    title: TITLE,
    description: DESCRIPTION,
    type: 'website',
    images: [{ url: OG_IMAGE, alt: 'RestroAgent' }],
  },
  twitter: {
    card: 'summary_large_image',
    title: TITLE,
    description: DESCRIPTION,
    images: [OG_IMAGE],
  },
};

export default function DemoPage() {
  if (!DEMO_MODE_ON) notFound();
  return <DemoClient />;
}
