import 'server-only'
import type {PrismaClient} from '@/generated/prisma/client'

function createPrismaClient(): PrismaClient {
  throw new Error('Not implemented')
}

const globalForPrisma = globalThis as unknown as {prisma: PrismaClient}

export const prismaClient = globalForPrisma.prisma || createPrismaClient()

if (process.env.NODE_ENV !== 'production') globalForPrisma.prisma = prismaClient
