import { VuiIcon } from '../icons'
import Svg, { SvgProps } from '../svg'
import { ThemingProps } from '../theme'
import { AnyString, PropsOf } from '../utils'

export type GetIconDetailsResult = {
  customIcon?: {
    d: string[]
    pathProps: React.SVGProps<SVGPathElement>[]
    svgProps: PropsOf<typeof Svg>
  }
  src?: string
}

export type IconProp = VuiIcon | AnyString

export type IconProps = SvgProps &
  ThemingProps<'Icon'> & {
    /** @deprecated use 'name' instead */
    icon?: IconProp
    /** Name of the icon stored in Veracity CDN. */
    name?: IconProp
    /** pathProps of the icon. */
    pathProps?: any
    /** Rotates the icon by given amount of degrees clockwise. */
    rotate?: number
    /** Uses a scale of 1-10 and multiply of 16px to define icon size. */
    scale?: number
  }
