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: "Gextras - Plataforma Inteligente de Talento Hospitalario",
  description: "Conecta empresas de eventos, restaurantes y hoteles con personal calificado en segundos. Control, velocidad y confianza en tu gestión de personal.",
  keywords: "plataforma hospitalaria, gestión de personal, staff temporal, trabajadores evento, bolsa de empleo, personal de catering, workers on demand, soluciones hospitalarias",
  robots: {
    index: true,
    follow: true,
  },
  openGraph: {
    title: "Gextras - Talento Hospitalario Instantáneo",
    description: "La plataforma que revoluciona cómo empresas de hospitalidad contratan y trabajadores encuentran oportunidades.",
    url: "https://gextras.com",
    siteName: "Gextras",
    type: "website",
    images: [
      {
        url: "http://img.b2bpic.net/free-vector/general-business-invoice-template_23-2148959395.jpg",
        alt: "Gextras - Dashboard inteligente de gestión de personal",
      },
    ],
  },
  twitter: {
    card: "summary_large_image",
    title: "Gextras - Revolución Hospitalaria",
    description: "Conecta talento con oportunidades en segundos. Plataforma inteligente para empresas y trabajadores.",
    images: ["http://img.b2bpic.net/free-vector/general-business-invoice-template_23-2148959395.jpg"],
  },
};

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>
  );
}