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";

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: 'OpsFlow Solutions | Local Tech & Operations Management',
  description: 'Streamline your business operations and elevate customer experiences with OpsFlow Solutions. We offer reliable technology, expert support, and smart management for local businesses.',
  keywords: ["local technology solutions, operations management, business support services, dispatch services, customer support, real-time monitoring, analytics, enterprise service management, local businesses, workflow optimization, efficiency solutions"],
  openGraph: {
    "title": "OpsFlow Solutions | Local Tech & Operations Management",
    "description": "Streamline your business operations and elevate customer experiences with OpsFlow Solutions. We offer reliable technology, expert support, and smart management for local businesses.",
    "url": "https://www.opsflowsolutions.com",
    "siteName": "OpsFlow Solutions",
    "images": [
      {
        "url": "http://img.b2bpic.net/free-photo/server-hub-programmer-using-ai-machine-learning-node-tree-software_482257-126014.jpg",
        "alt": "OpsFlow Solutions Operations Center"
      }
    ],
    "type": "website"
  },
  twitter: {
    "card": "summary_large_image",
    "title": "OpsFlow Solutions | Local Tech & Operations Management",
    "description": "Streamline your business operations and elevate customer experiences with OpsFlow Solutions. We offer reliable technology, expert support, and smart management for local businesses.",
    "images": [
      "http://img.b2bpic.net/free-photo/server-hub-programmer-using-ai-machine-learning-node-tree-software_482257-126014.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>
  );
}
