'use server'
import {ReactNode} from 'react'
import {Metadata} from 'next'
import './globals.css'
import {Toaster} from '@/components/ui/sonner'
import StoresProvider from '@/components/stores-provider'
import Effects from '@/app/effects'

export async function generateMetadata(): Promise<Metadata> {
  return {
    title: '蓝狐代理',
  }
}

export default async function RootLayout({
  children,
}: Readonly<{
  children: ReactNode
}>) {
  return (
    <html lang="zh-CN">
      <body>
        <StoresProvider>
          <Effects>{children}</Effects>
        </StoresProvider>
        <Toaster position="top-center" richColors expand/>
      </body>
    </html>
  )
}
