import { useRoute } from '@react-navigation/core'

export function createParams<T>(params: T): T {
  return { ...params }
}

export function useParams<T extends any>(): T {
  return useRoute().params as T
}