import type React from 'react'
import { useDominoDOMContext } from './domino-hooks'

/**
 * Hook to get the Domino container DOM reference.
 * Priority: explicitly provided ref > container ref from DominoDOMContext
 */
export function useDominoContainer(
  explicitRef?: React.RefObject<HTMLElement | null>,
) {
  const contextRef = useDominoDOMContext()
  return explicitRef || contextRef
}
