import { IProps } from "@/common/Iprops.interface"
import { useMemo } from "react"

enum Gradient{
    Linear = 1,
    Radial
}


interface BallType extends IProps{
    size:string,
    color:'white'|'gray'|'blue'
}
export const Ball =(props:BallType)=>{
    const {color} = props
    const ballColor = useMemo(()=>{
      
        if(!color) return
        else{
            switch(color){
                case 'white': 
                    return `#fffff`
                case 'blue':
                    return `linear-gradient(210deg,#02FBD5 20%,#7538F3 65%),
                            linear-gradient(120deg,#02FBD5,#1C62EE)`
                default:
                    return ''
            }
        }
    },[props.color])
    return(
        <div className={`absolute  rounded-full`} 
             style={{ 
                width:props.size,
                height:props.size,
                background:ballColor,
             }}
        />
    )
}
