import type { Metadata } from "next";
import { Halant } from "next/font/google";
import { Inter } from "next/font/google";
import { Mulish } 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 mulish = Mulish({
  variable: "--font-mulish",
  subsets: ["latin"],
});

export const metadata: Metadata = {
  title: "WindowFlow - Window Furnishing Operations Software",
  description: "Streamline your window treatment business with WindowFlow. Manage orders, inventory, scheduling, and installations in one powerful SaaS platform.",
  keywords: "window furnishing software, operations management, order management, inventory tracking, scheduling software, window treatment business",
  metadataBase: new URL("https://www.windowflow.com"),
  alternates: {
    canonical: "https://www.windowflow.com",
  },
  openGraph: {
    title: "WindowFlow - Transform Your Window Furnishing Business",
    description: "Reduce operational time by 70% with intelligent order management, inventory tracking, and scheduling for window treatment professionals.",
    url: "https://www.windowflow.com",
    siteName: "WindowFlow",
    type: "website",
    images: [
      {
        url: "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3BB1l1c7xNTHi2gGoCUeRPx9S5j/modern-software-dashboard-showing-order--1773947898631-5265040a.png",
        alt: "WindowFlow dashboard platform",
      },
    ],
  },
  twitter: {
    card: "summary_large_image",
    title: "WindowFlow - Window Furnishing Operations Software",
    description: "Streamline orders, inventory, and scheduling. Join 500+ window treatment businesses.",
    images: [
      "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3BB1l1c7xNTHi2gGoCUeRPx9S5j/modern-software-dashboard-showing-order--1773947898631-5265040a.png",
    ],
  },
  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} ${mulish.variable} antialiased`}
        >
          <Tag />
          {children}
          <script
              dangerouslySetInnerHTML={{
                  __html: `${getVisualEditScript()}`
          }}
        />
        </body>
      </ServiceWrapper>
    </html>
  );
}