import type { Metadata } from "next";
import { Halant } from "next/font/google";
import { Inter } from "next/font/google";
import "./globals.css";
import "@/lib/gsap-setup";
import { ServiceWrapper } from "@/components/ServiceWrapper";
import Tag from "@/tag/Tag";
import { getVisualEditScript } from "@/utils/visual-edit-script";
import { Lato } from "next/font/google";



export const metadata: Metadata = {
  title: 'EcoSegregate | AI-Powered Waste Management Platform',
  description: 'Segregate smarter, recycle better, and earn rewards with our AI-powered platform for waste identification, guidance, and municipal optimization.',
  keywords: ["AI waste management, waste segregation, recycling app, ecopoints, municipal waste, sustainability platform, image recognition waste"],
  openGraph: {
    "title": "EcoSegregate | AI-Powered Waste Management Platform",
    "description": "Segregate smarter, recycle better, and earn rewards with our AI-powered platform for waste identification, guidance, and municipal optimization.",
    "url": "https://www.ecosegregate.com",
    "siteName": "EcoSegregate",
    "images": [
      {
        "url": "http://img.b2bpic.net/free-photo/shallow-focus-shot-hand-holding-smartphone_181624-46930.jpg",
        "alt": "EcoSegregate app on smartphone identifying waste"
      }
    ],
    "type": "website"
  },
  twitter: {
    "card": "summary_large_image",
    "title": "EcoSegregate | AI-Powered Waste Management Platform",
    "description": "Segregate smarter, recycle better, and earn rewards with our AI-powered platform for waste identification, guidance, and municipal optimization.",
    "images": [
      "http://img.b2bpic.net/free-photo/shallow-focus-shot-hand-holding-smartphone_181624-46930.jpg"
    ]
  },
  robots: {
    "index": true,
    "follow": true
  },
};

const lato = Lato({
  variable: "--font-lato",
  subsets: ["latin"],
  weight: ["100", "300", "400", "700", "900"],
});

export default function RootLayout({
  children,
}: Readonly<{
  children: React.ReactNode;
}>) {
  return (
    <html lang="en" suppressHydrationWarning>
      <ServiceWrapper>
        <body className={`${lato.variable} antialiased`}>
          <Tag />
          {children}
          <script
              dangerouslySetInnerHTML={{
                  __html: `${getVisualEditScript()}`
              }}
          />
        </body>
      </ServiceWrapper>
    </html>
  );
}
