// Cloudflare Turnstile types
interface TurnstileOptions {
  sitekey: string
  theme?: 'light' | 'dark' | 'auto'
  size?: 'normal' | 'compact' | 'flexible'
  callback?: (token: string) => void
  'error-callback'?: () => void
  execution?: 'render' | 'execute'
  appearance?: 'always' | 'execute' | 'interaction-only'
}

interface Turnstile {
  render(container: string | HTMLElement, options: TurnstileOptions): string
  reset(widgetId: string): void
  remove(widgetId: string): void
  getResponse(widgetId: string): string
  isExpired(widgetId: string): boolean
  execute(container: string | HTMLElement): void
}

interface Window {
  turnstile: Turnstile
}
