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

const halant = Halant({
  variable: "--font-halant",
  subsets: ["latin"],
  weight: ["300", "400", "500", "600", "700"],
});

const inter = Inter({
  variable: "--font-inter",
  subsets: ["latin"],
});

const dmSans = DM_Sans({
  variable: "--font-dm-sans",
  subsets: ["latin"],
});

export const metadata: Metadata = {
  title: "AIRBRONE AI - Intelligent AI Helper | Study, Code, Business, Research",
  description: "AIRBRONE AI combines Gemini + ChatGPT intelligence into 4 powerful modes: Study Helper, Code Assistant, Business Intelligence & Deep Research. Available on iOS, iPadOS & Android.",
  keywords: "AI assistant, study helper, code helper, business intelligence, deep research, Gemini, ChatGPT, iOS app, Android app, AI platform",
  metadataBase: new URL("https://airbroneai.com"),
  alternates: {
    canonical: "https://airbroneai.com",
  },
  openGraph: {
    title: "AIRBRONE AI - Your Intelligent Assistant",
    description: "Four powerful AI modes combining Gemini and ChatGPT. Study, code, manage business, and research seamlessly.",
    url: "https://airbroneai.com",
    siteName: "AIRBRONE AI",
    type: "website",
    images: [
      {
        url: "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3B9dMftQ4AQBXAKtnCOA7fukWXU/modern-ai-application-dashboard-with-cle-1773905442678-2f17b25a.png",
        alt: "AIRBRONE AI Dashboard",
      },
    ],
  },
  twitter: {
    card: "summary_large_image",
    title: "AIRBRONE AI - Intelligent AI Platform",
    description: "Combining Gemini + ChatGPT into 4 specialized AI modes for maximum productivity.",
    images: [
      "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3B9dMftQ4AQBXAKtnCOA7fukWXU/modern-ai-application-dashboard-with-cle-1773905442678-2f17b25a.png",
    ],
  },
  robots: {
    index: true,
    follow: true,
  },
};

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