import { type IconName, icons } from '@channel.io/bezier-icons'
const iconNames = new Set(Object.keys(icons))
/**
* @deprecated Please import and use individual icons.
* @example
* import { AllIcon } from '@channel.io/bezier-icons'
* import { Icon, type IconProps } from '@channel.io/bezier-react'
*
* @example
How to validate the bezier icon source
* import { isBezierIcon, AllIcon } from '@channel.io/bezier-icons'
* isBezierIcon(AllIcon) // true
* isBezierIcon(() => ) // false
* @example Legacy icon component is still available. but it will be removed in future versions!
* import { LegacyIcon, type LegacyIconProps } from '@channel.io/bezier-react'
*
*/
export const isIconName = (name: any): name is IconName => iconNames.has(name)