'use client'
import { useEffect, ReactNode } from 'react'

interface Props { children: ReactNode }

/**
 * SmoothScrollProvider
 * Menggunakan CSS scroll-behavior: smooth (native, zero-dependency).
 * Lenis dapat ditambahkan nanti setelah install: npm i @studio-freight/lenis
 */
export default function SmoothScrollProvider({ children }: Props) {
  useEffect(() => {
    // Native CSS smooth scroll — bekerja di semua browser modern
    document.documentElement.style.scrollBehavior = 'smooth'
    return () => {
      document.documentElement.style.scrollBehavior = ''
    }
  }, [])

  return <>{children}</>
}
