import type { Metadata } from "next";
import { Geist, Geist_Mono } from "next/font/google";
import "./globals.css";
import { Toaster } from "@/components/ui/toaster";
import Providers from "@/components/Providers";
import { DynamicFavicon } from "@/components/DynamicFavicon";

const geistSans = Geist({
  variable: "--font-geist-sans",
  subsets: ["latin"],
});

const geistMono = Geist_Mono({
  variable: "--font-geist-mono",
  subsets: ["latin"],
});

export const metadata: Metadata = {
  title: "Needyfy - Every Need, One Platform",
  description: "Bangladesh's complete super app for house rental, shop rental, marketplace, medicine, MCQ exam and more. One App for Every Need.",
  keywords: ["Needyfy", "Bangladesh", "Super App", "House Rental", "Marketplace", "MCQ", "Medicine", "Shopping"],
  authors: [{ name: "Needyfy Team" }],
  icons: {
    icon: [
      { url: "/favicon.svg", type: "image/svg+xml" },
      { url: "/favicon.png", sizes: "32x32" },
      { url: "/logo-needyfy.png", sizes: "192x192" },
    ],
    apple: "/logo-needyfy.png",
  },
  openGraph: {
    title: "Needyfy - Every Need, One Platform",
    description: "Bangladesh's complete super app for all your daily needs",
    siteName: "Needyfy",
    type: "website",
  },
  twitter: {
    card: "summary_large_image",
    title: "Needyfy - Every Need, One Platform",
    description: "Bangladesh's complete super app for all your daily needs",
  },
};

export default function RootLayout({
  children,
}: Readonly<{
  children: React.ReactNode;
}>) {
  return (
    <html lang="en" suppressHydrationWarning>
      <body
        className={`${geistSans.variable} ${geistMono.variable} antialiased bg-background text-foreground`}
      >
        <Providers>
          <DynamicFavicon />
          {children}
          <Toaster />
        </Providers>
      </body>
    </html>
  );
}
