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 { getVisualEditScript } from "@/utils/visual-edit-script";
import { Open_Sans } from "next/font/google";



export const metadata: Metadata = {
  title: 'Fair Finance Loans | Your Local Lending Partner',
  description: 'Get clear, fair, and accessible financial solutions with Fair Finance Loans. We offer personal, auto, home equity, and business loans tailored to your needs. Fast approval and local service.',
  keywords: ["local loans, personal loans, auto loans, home equity loans, business loans, debt consolidation, financial solutions, fair finance, community lending"],
  openGraph: {
    "title": "Fair Finance Loans | Your Local Lending Partner",
    "description": "Get clear, fair, and accessible financial solutions with Fair Finance Loans. We offer personal, auto, home equity, and business loans tailored to your needs. Fast approval and local service.",
    "url": "https://www.fairfinanceloans.com/",
    "siteName": "Fair Finance Loans",
    "images": [
      {
        "url": "http://img.b2bpic.net/free-photo/two-busy-workers-modern-office_329181-15330.jpg",
        "alt": "Fair Finance Loans office interior with happy clients"
      }
    ],
    "type": "website"
  },
  twitter: {
    "card": "summary_large_image",
    "title": "Fair Finance Loans | Your Local Lending Partner",
    "description": "Get clear, fair, and accessible financial solutions with Fair Finance Loans. We offer personal, auto, home equity, and business loans tailored to your needs. Fast approval and local service.",
    "images": [
      "http://img.b2bpic.net/free-photo/two-busy-workers-modern-office_329181-15330.jpg"
    ]
  },
  robots: {
    "index": true,
    "follow": true
  },
};

const openSans = Open_Sans({
  variable: "--font-open-sans",
  subsets: ["latin"],
});

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