import type { Metadata } from 'next';
import './globals.css';

export const metadata: Metadata = {
    title: 'پنل ادمین',

    alternates: {
        canonical: '/',
        languages: {
            'fa-IR': '/',
        },
    },



};

export default function RootLayout({
    children,
}: {
    children: React.ReactNode;
}) {
    return (
        <html lang="fa" dir="rtl" suppressHydrationWarning>
            <head>
                {/* Apply the saved/system theme before paint to avoid a flash of the wrong theme */}
                <script
                    dangerouslySetInnerHTML={{
                        __html: `(function(){try{var t=localStorage.getItem('theme');var d=t?t==='dark':window.matchMedia('(prefers-color-scheme: dark)').matches;if(d)document.documentElement.classList.add('dark');}catch(e){}})();`,
                    }}
                />
                <meta
                    name="google-site-verification"
                    content="HIKgdf_siYdPxbJ2P1792opMprpxci_QjE-quk9kyi8"
                />
                {/* Favicon */}
                <link rel="icon" href="/favicon.ico" sizes="any" />
                <link rel="icon" href="/icon?<generated>" type="image/<generated>" sizes="<generated>" />
                <link rel="apple-touch-icon" href="/apple-touch-icon.png" />

                {/* Preload critical resources */}
                <link rel="preconnect" href="https://fonts.googleapis.com" />
                <link rel="preconnect" href="https://fonts.gstatic.com" crossOrigin="anonymous" />

                {/* Structured Data for SEO */}

            </head>
            <body className="antialiased">
                {children}
            </body>
        </html>
    );
}