export type TooltipPosition = "left" | "right" | "top" | "bottom"
type VerticalArrow = "top" | "bottom" | "center"
type HorizontalArrow = "left" | "right" | "center"

type ValidArrowMap = {
  left: VerticalArrow
  right: VerticalArrow
  top: HorizontalArrow
  bottom: HorizontalArrow
}

type ValidArrow<P extends TooltipPosition> = P extends keyof ValidArrowMap
  ? ValidArrowMap[P]
  : never

export interface TooltipProps<P extends TooltipPosition = TooltipPosition> {
  heading?: string
  text?: string
  position: P
  arrow: ValidArrow<P>
  isTouchable?: boolean
}
