import { Provider } from '@/components/Provider';
import { mantineHtmlProps } from '@mantine/core';
import type { Metadata, Viewport } from 'next';
import localFont from 'next/font/local';
import './globals.css';

const outfit = localFont({
  src: [
    { path: './fonts/outfit-latin-400.woff2', weight: '400', style: 'normal' },
    { path: './fonts/outfit-latin-500.woff2', weight: '500', style: 'normal' },
    { path: './fonts/outfit-latin-600.woff2', weight: '600', style: 'normal' },
    { path: './fonts/outfit-latin-700.woff2', weight: '700', style: 'normal' },
  ],
  variable: '--font-outfit',
  display: 'swap',
});

export const metadata: Metadata = {
  title: 'HidroTintas | Administração',
  description: 'Painel administrativo HidroTintas.',
};

export const viewport: Viewport = {
  themeColor: '#f4f1eb',
};

export default function RootLayout({ children }: LayoutProps<'/'>) {
  return (
    <html lang="pt-BR" className={outfit.variable} {...mantineHtmlProps}>
      <body className="min-h-dvh">
        <Provider>{children}</Provider>
      </body>
    </html>
  );
}
