import type { Metadata } from "next";
import { DM_Sans } 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";

const dmSans = DM_Sans({
  variable: "--font-dm-sans",  subsets: ["latin"],
});

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

export const metadata: Metadata = {
  title: "Adirondack Peaks Furniture - Wholesale Amish-Made Outdoor Furniture",  description: "Premium wholesale manufacturer of Amish-made poly outdoor furniture. Specializing in Adirondack chairs, dining sets, gliders, swings, and outdoor living products for authorized dealers.",  keywords: "Amish outdoor furniture, Adirondack furniture, Poly outdoor furniture, Wholesale patio furniture, Adirondack chairs wholesale, Outdoor furniture dealers, Amish-made outdoor furniture, Upstate New York outdoor furniture, outdoor living products, poly lumber furniture",  metadataBase: new URL('https://www.adirondackpeaks.com'),
  alternates: {
    canonical: 'https://www.adirondackpeaks.com'
  },
  openGraph: {
    title: "Adirondack Peaks Furniture - Wholesale Amish-Made Outdoor Furniture",    description: "Premium wholesale manufacturer of Amish-made poly outdoor furniture for authorized dealers.",    url: "https://www.adirondackpeaks.com",    siteName: "Adirondack Peaks Furniture",    images: [{
      url: "http://img.b2bpic.net/free-photo/two-empty-chairs-wooden-pier-overlooking-mountains-sunset-light_169016-9949.jpg",      alt: "Adirondack chairs overlooking a lake"
    }],
    type: "website"
  },
  twitter: {
    card: "summary_large_image",    title: "Adirondack Peaks Furniture - Wholesale Amish-Made Outdoor Furniture",    description: "Premium wholesale manufacturer of Amish-made poly outdoor furniture for authorized dealers.",    images: ["http://img.b2bpic.net/free-photo/two-empty-chairs-wooden-pier-overlooking-mountains-sunset-light_169016-9949.jpg"]
  },
  robots: {
    index: true,
    follow: true
  }
};

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