import type { Metadata } from "next";
import { Halant } from "next/font/google";
import { Inter } from "next/font/google";
import { Lato } 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 lato = Lato({
  variable: "--font-lato",
  subsets: ["latin"],
  weight: ["100", "300", "400", "700", "900"],
});

export const metadata: Metadata = {
  title: "24/7 Emergency Tree Removal & Lawn Service | A-1 Discount",
  description: "Professional tree removal, trimming, and stump grinding available 24/7. 4.8-star rated. Free estimates. Insurance-approved vendor. Same-day emergency service.",
  keywords: "tree removal, emergency tree service, tree trimming, stump grinding, 24/7 tree service, storm damage cleanup, lawn care",
  robots: {
    index: true,
    follow: true,
  },
  openGraph: {
    title: "Fast, Professional Tree Removal & Lawn Care — 24/7",
    description: "Emergency tree removal with guaranteed cleanup. 4.8-star rated local service. Call now for same-day estimates.",
    type: "website",
    siteName: "A-1 Discount Tree & Lawn Service",
  },
  twitter: {
    card: "summary_large_image",
    title: "24/7 Emergency Tree Removal Service",
    description: "Professional tree service you can trust. Fast response, fair pricing, complete cleanup guaranteed.",
  },
};

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