// app/layout.js - MINIMAL SERVER COMPONENT
import './globals.css';
import { Suspense } from 'react';
import Script from 'next/script';
import { SearchProvider } from './context/SearchContext';
import { WishlistProvider } from './context/WishlistContext';
import { LoaderProvider } from './context/LoaderContext';
import LoaderHandler from './components/LoaderHandler';
import WhatsAppFloat from './components/atoms/WhatsAppFloat';
import GoogleAnalytics from './components/GoogleAnalytics';

const organizationSchema = {
  "@context": "https://schema.org",
  "@type": ["Organization", "EducationalOrganization"],
  "@id": "https://universitiespage.com/#organization",
  "name": "Universities Page",
  "alternateName": "Universities Page International Education Consultants",
  "url": "https://universitiespage.com/",
  "logo": "https://universitiespage.com/assets/logo.png",
  "description": "Universities Page is a Pakistan-based international education services company and trusted study abroad consultants in Lahore, Karachi, Faisalabad, and Islamabad. We provide student visa consulting, career counseling, SOP and statement of purpose assistance, and complete student visa application support for countries including the UK, Italy, France, Sweden, Finland, Turkey, Cyprus, Romania, South Korea, and China",
  "keywords": [
    "international education services",
    "study abroad consultants",
    "student visa consultants Pakistan",
    "career counseling services Pakistan",
    "student visa application assistance",
    "SOP statement of purpose assistance",
    "study abroad consultants in Lahore",
    "student visa consultants in Karachi",
    "overseas education consultants in Islamabad",
    "study visa services in Faisalabad",
    "UK study visa consultants Pakistan",
    "Italy study visa consultants Pakistan",
    "France study visa consultants Pakistan",
    "Europe study visa consultants Pakistan"
  ],
  "foundingLocation": {
    "@type": "Place",
    "name": "Garden Town Lahore",
    "address": {
      "@type": "PostalAddress",
      "streetAddress": "Garden Town Raja Market",
      "addressLocality": "Lahore",
      "postalCode": "54400",
      "addressCountry": "PK"
    }
  },
  "areaServed": [
    {
      "@type": "City",
      "name": "Lahore",
      "keywords": "study abroad consultants Lahore, student visa consultants Lahore, overseas education services Lahore"
    },
    {
      "@type": "City",
      "name": "Karachi",
      "keywords": "study abroad consultants Karachi, student visa consultants Karachi, overseas education services Karachi"
    },
    {
      "@type": "City",
      "name": "Faisalabad",
      "keywords": "study abroad consultants Faisalabad, student visa consultants Faisalabad, study visa services Faisalabad"
    },
    {
      "@type": "City",
      "name": "Islamabad",
      "keywords": "study abroad consultants Islamabad, student visa consultants Islamabad, overseas education services Islamabad"
    }
  ],
  "contactPoint": {
    "@type": "ContactPoint",
    "telephone": "+92-300-4010780",
    "contactType": "Student Visa Consultation",
    "email": "info@universitiespage.com",
    "availableLanguage": ["English", "Urdu"],
    "areaServed": "PK"
  },
  "sameAs": [
    "https://www.facebook.com/universitiespagelahore",
    "https://twitter.com/UniversitiesPa1",
    "https://linkedin.com/in/universities-page-4728301b5",
    "https://www.instagram.com/universitiespage_official/",
    "https://whatsapp.com/channel/0029Va7vJOYJkK79737At844"
  ],
  "hasOfferCatalog": {
    "@type": "OfferCatalog",
    "name": "Study Abroad & Student Visa Consulting Services",
    "itemListElement": [
      { "@type": "Service", "name": "China Study Visa Consultant" },
      { "@type": "Service", "name": "Italy Study Visa Consultant" },
      { "@type": "Service", "name": "Turkey Study Visa Consultant" },
      { "@type": "Service", "name": "Cyprus Study Visa Consultant" },
      { "@type": "Service", "name": "Finland Study Visa Consultant" },
      { "@type": "Service", "name": "South Korea Study Visa Consultant" },
      { "@type": "Service", "name": "Romania Study Visa Consultant" },
      { "@type": "Service", "name": "UK Study Visa Consultant" },
      { "@type": "Service", "name": "Sweden Study Visa Consultant" },
      { "@type": "Service", "name": "France Study Visa Consultant" },
      { "@type": "Service", "name": "Career Counseling Services" },
      { "@type": "Service", "name": "Student Visa Application Assistance" },
      { "@type": "Service", "name": "SOP Statement of Purpose Assistance" }
    ]
  }
};

export default function RootLayout({ children }) {
  return (
    <html lang="en" suppressHydrationWarning>
      <meta name="google-site-verification" content="FTz3OQ2FaF_1ubm2-YMXJlJcDz3Uxo55HGtv5vzUcd8" />
      <meta name="google-site-verification" content="0m6HCXV8Q3bfrzUtFlbjTfMonzj2d7wSNKmCRV-XV1k" />

      <head>
        <script
          type="application/ld+json"
          dangerouslySetInnerHTML={{ __html: JSON.stringify(organizationSchema) }}
        />
        <link rel="preconnect" href="https://www.youtube.com" />
        <link rel="dns-prefetch" href="https://www.youtube.com" />
      </head>
      <body className="antialiased">
        <SearchProvider>
          <WishlistProvider>
            <LoaderProvider>
              
              <Suspense fallback={null}>
                <LoaderHandler />
              </Suspense>
              {children}
              <Script
                src="https://accounts.google.com/gsi/client"
                strategy="afterInteractive"
              />
              <GoogleAnalytics />
            </LoaderProvider>
          </WishlistProvider>
        </SearchProvider>
        <WhatsAppFloat
          phoneNumber="923106225411"
          message="Hello! I'm interested in your services."
        />
      </body>
    </html>
  );
}