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";
import { Playfair_Display, Cormorant_Garamond, Inter } from "next/font/google";



export const metadata: Metadata = {
  title: 'Olivia Panetteria | Pan de Masa Madre Artesanal en Guatemala',
  description: 'Olivia Panetteria elabora pan artesanal de masa madre en Ciudad de Guatemala. Fermentación lenta de 48 horas, sin aditivos. Pedidos semanales con entrega a domicilio.',
  keywords: ["pan masa madre guatemala, panadería artesanal guatemala, sourdough guatemala, pan artesanal ciudad de guatemala, olivia panetteria"],
  openGraph: {
    "title": "Olivia Panetteria | Pan de Masa Madre Artesanal en Guatemala",
    "description": "Olivia Panetteria elabora pan artesanal de masa madre en Ciudad de Guatemala. Fermentación lenta de 48 horas, sin aditivos. Pedidos semanales con entrega a domicilio.",
    "url": "https://www.oliviapanetteria.com",
    "siteName": "Olivia Panetteria",
    "images": [
      {
        "url": "http://img.b2bpic.net/free-photo/wine-religious-ceremony_23-2150322325.jpg",
        "alt": "Pan de masa madre recién horneado"
      }
    ],
    "type": "website"
  },
  twitter: {
    "card": "summary_large_image",
    "title": "Olivia Panetteria | Pan de Masa Madre Artesanal en Guatemala",
    "description": "Olivia Panetteria elabora pan artesanal de masa madre en Ciudad de Guatemala. Fermentación lenta de 48 horas, sin aditivos. Pedidos semanales con entrega a domicilio.",
    "images": [
      "http://img.b2bpic.net/free-photo/wine-religious-ceremony_23-2150322325.jpg"
    ]
  },
  robots: {
    "index": true,
    "follow": true
  },
};

const playfairDisplay = Playfair_Display({ variable: "--font-playfair-display", subsets: ["latin"], weight: ["700", "900"] });
const cormorantGaramond = Cormorant_Garamond({ variable: "--font-cormorant-garamond", subsets: ["latin"], style: ["normal", "italic"] });
const inter = Inter({ variable: "--font-inter", subsets: ["latin"], weight: ["300", "400"] });

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