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: 'Rebuild Texas Roofing & Windows | Luxury Home Exterior Solutions',
  description: 'Premium roofing and window solutions in Texas. Experience stress-free roof replacement, storm damage claims, and window installation with expert craftsmanship and transparent communication.',
  keywords: ["Texas roofing, Texas windows, roof replacement, storm damage, hail damage, window installation, luxury roofing, stress-free contractors, home exterior, Austin, Dallas, Houston, San Antonio"],
  openGraph: {
    "title": "Rebuild Texas Roofing & Windows",
    "description": "Premium roofing and window solutions for Texas homeowners.",
    "url": "https://www.rebuildtexas.com",
    "siteName": "Rebuild Texas",
    "images": [
      {
        "url": "https://pixabay.com/get/g53b18cb7117c4c26e1d20dcb262834c7dcbbd446b120bc7555f010ebce6e1c65aca9561fcc23c5d91c374eb801e04469964d2d3fb52961d687af71101381d53c_1280.jpg",
        "alt": "Luxurious new roof on a modern Texas home"
      }
    ],
    "type": "website"
  },
  twitter: {
    "card": "summary_large_image",
    "title": "Rebuild Texas Roofing & Windows",
    "description": "Premium roofing and window solutions for Texas homeowners.",
    "images": [
      "https://pixabay.com/get/g53b18cb7117c4c26e1d20dcb262834c7dcbbd446b120bc7555f010ebce6e1c65aca9561fcc23c5d91c374eb801e04469964d2d3fb52961d687af71101381d53c_1280.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>
  );
}
