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: "W&M Services | Professional Landscaping in Washington DC",
  description: "Award-winning landscaping company in DC. Expert fence installation, gate services, backyard renovation. 4.9★ rated. Free quote today!",
  keywords: "landscaping Washington DC, fence installation DC, backyard renovation, gate installation, landscape design, outdoor improvement",
  metadataBase: new URL("https://www.wmnservices.com"),
  alternates: {
    canonical: "https://www.wmnservices.com",
  },
  openGraph: {
    title: "W&M Services | Professional Landscaping Washington DC",
    description: "Transform your outdoor space with award-winning landscaping services. 4.9★ rated. Free consultation available.",
    url: "https://www.wmnservices.com",
    siteName: "W&M Services",
    type: "website",
    images: [
      {
        url: "https://www.wmnservices.com/og-image.jpg",
        alt: "W&M Services Professional Landscaping",
      },
    ],
  },
  twitter: {
    card: "summary_large_image",
    title: "W&M Services | Professional Landscaping DC",
    description: "Award-winning landscaping & outdoor services. Free quote!",
    images: ["https://www.wmnservices.com/twitter-image.jpg"],
  },
  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>
  );
}