import { Analytics } from '@vercel/analytics/next'
import type { Metadata, Viewport } from 'next'
import { Plus_Jakarta_Sans, Inter, Manrope } from 'next/font/google'
import './globals.css'

const jakarta = Plus_Jakarta_Sans({
  subsets: ['latin'],
  variable: '--font-jakarta',
  weight: ['500', '600', '700', '800'],
  display: 'swap',
})

const inter = Inter({
  subsets: ['latin'],
  variable: '--font-inter',
  display: 'swap',
})

const manrope = Manrope({
  subsets: ['latin'],
  variable: '--font-manrope',
  weight: ['600', '700'],
  display: 'swap',
})

export const metadata: Metadata = {
  title: 'PT Mustieka Barokah Mandiri | Memberdayakan Komunitas Pedesaan',
  description:
    'PT Mustieka Barokah Mandiri (PT MBM) adalah perusahaan sosial peternakan domba Garut yang memberdayakan komunitas pedesaan melalui program GS4P — Garut Sheep for Prosperity.',
  keywords: [
    'PT Mustieka Barokah Mandiri',
    'PT MBM',
    'domba Garut',
    'GS4P',
    'Garut Sheep for Prosperity',
    'peternakan sosial',
    'social enterprise',
    'pemberdayaan pedesaan',
    'kemitraan peternak',
  ],
  authors: [{ name: 'PT Mustieka Barokah Mandiri' }],
  openGraph: {
    title: 'PT Mustieka Barokah Mandiri',
    description:
      'Memberdayakan Komunitas Pedesaan, Membangun Kesejahteraan Lewat Satu Domba.',
    type: 'website',
    locale: 'id_ID',
  },
  generator: 'v0.app',
}

export const viewport: Viewport = {
  themeColor: '#1b4332',
  colorScheme: 'light',
  width: 'device-width',
  initialScale: 1,
}

export default function RootLayout({
  children,
}: Readonly<{
  children: React.ReactNode
}>) {
  return (
    <html
      lang="id"
      className={`${jakarta.variable} ${inter.variable} ${manrope.variable} bg-background`}
    >
      <body className="antialiased font-sans">
        {children}
        {process.env.NODE_ENV === 'production' && <Analytics />}
      </body>
    </html>
  )
}
