import type { Metadata } from "next";
import { Halant } from "next/font/google";
import { Inter } from "next/font/google";
import { Montserrat } 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 montserrat = Montserrat({
  variable: "--font-montserrat",
  subsets: ["latin"],
});

export const metadata: Metadata = {
  title: "TD's Lawn-Care | Professional & Reliable Lawn Service",
  description: "Professional lawn care service offering mowing, edging, flower bed care, and seasonal clean-ups. Always on time, always professional, always exceptional results.",
  keywords: "lawn care, lawn mowing, landscaping, flower bed care, yard maintenance, professional lawn service",
  metadataBase: new URL("https://tdlawncare.com"),
  alternates: {
    canonical: "https://tdlawncare.com",
  },
  openGraph: {
    title: "TD's Lawn-Care | Professional & Reliable Lawn Service",
    description: "Experience professional lawn care you can count on. Bi-weekly service, fair pricing, and results that speak for themselves.",
    url: "https://tdlawncare.com",
    siteName: "TD's Lawn-Care",
    type: "website",
  },
  twitter: {
    card: "summary_large_image",
    title: "TD's Lawn-Care | Professional & Reliable Lawn Service",
    description: "Professional lawn care service. Always on time, always professional, always exceptional.",
  },
  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} ${montserrat.variable} antialiased`}
        >
          <Tag />
          {children}
          <script
              dangerouslySetInnerHTML={{
                  __html: `${getVisualEditScript()}`
          }}
        />
        </body>
      </ServiceWrapper>
    </html>
  );
}