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";



export const metadata: Metadata = {
  title: 'HabitSync AI - Personal AI Habit & Workout Trainer',
  description: 'Master your habits, track progress, and get personalized AI-powered workout routines. Transform your life with intelligent coaching and visual charts.',
  keywords: ["habit tracker, AI personal trainer, workout routines, fitness app, personal growth, daily habits, progress charts, AI coaching, self-improvement"],
  openGraph: {
    "title": "HabitSync AI - Personal AI Habit & Workout Trainer",
    "description": "Master your habits, track progress, and get personalized AI-powered workout routines. Transform your life with intelligent coaching and visual charts.",
    "url": "https://habitsyncai.com",
    "siteName": "HabitSync AI",
    "images": [
      {
        "url": "http://img.b2bpic.net/free-photo/relax-window-book-female-sunrise-waking_1418-16.jpg",
        "alt": "HabitSync AI dashboard"
      }
    ],
    "type": "website"
  },
  twitter: {
    "card": "summary_large_image",
    "title": "HabitSync AI - Personal AI Habit & Workout Trainer",
    "description": "Master your habits, track progress, and get personalized AI-powered workout routines. Transform your life with intelligent coaching and visual charts.",
    "images": [
      "http://img.b2bpic.net/free-photo/relax-window-book-female-sunrise-waking_1418-16.jpg"
    ]
  },
  robots: {
    "index": true,
    "follow": true
  },
};

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

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