import { useCallback, useState } from 'react'

import type { UseNavigationStateReturn } from '../types'

export function useNavigationState(): UseNavigationStateReturn {
  const [activeTab, setActiveTab] = useState('analytics')

  const onTabChange = useCallback((tab: string) => {
    setActiveTab(tab)
  }, [])

  return {
    activeTab,
    onTabChange,
  }
}