'use client'

import { createContext, type ComponentProps } from 'react'
import type { DirectionProvider } from '@base-ui/react/direction-provider'

type Theme = 'dark' | 'light' | 'system'
type ResolvedTheme = Exclude<Theme, 'system'>

export interface GDSContextValue {
  theme: Theme
  activeTheme: ResolvedTheme
  direction: NonNullable<ComponentProps<typeof DirectionProvider>['direction']>
  language: string
}

export const GDSContext = createContext<GDSContextValue | null>(null)
