import type { Metadata } from "next";
import { Halant } from "next/font/google";
import { Inter } 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"],
});

export const metadata: Metadata = {
  title: "Esilos Print & Design | Website Design for Local Businesses Ontario",
  description: "Professional website design for local businesses in Ontario. Get more customers with a modern, mobile-optimized website. Free consultation: 519-792-3115",
  keywords: "website design Ontario, local business websites, small business web design, professional website builder, lead generation websites",
  metadataBase: new URL("https://esilosprint.com"),
  alternates: {
    canonical: "https://esilosprint.com",
  },
  openGraph: {
    title: "Professional Websites for Local Businesses | Esilos Print & Design",
    description: "Transform your local business with a professional, lead-generating website. Designed specifically for Ontario service businesses.",
    url: "https://esilosprint.com",
    siteName: "Esilos Print & Design",
    type: "website",
    images: [
      {
        url: "http://img.b2bpic.net/free-vector/admin-dashboard-panel-template_23-2147900458.jpg",
        alt: "Esilos Print & Design - Professional Websites for Local Businesses",
      },
    ],
  },
  twitter: {
    card: "summary_large_image",
    title: "Professional Websites for Local Businesses | Esilos",
    description: "Get a modern website that brings you more customers. Built for local service businesses.",
    images: ["http://img.b2bpic.net/free-vector/admin-dashboard-panel-template_23-2147900458.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} antialiased`}
        >
          <Tag />
          {children}
          <script
              dangerouslySetInnerHTML={{
                  __html: `${getVisualEditScript()}`
          }}
        />
        </body>
      </ServiceWrapper>
    </html>
  );
}