import {EnglishToPersian} from "../../helpers/EnglishToPersian";
import downProfit from './../../assets/images/downProfit.svg'
import upProfit from './../../assets/images/upProfit.svg'
import zeroProfit from './../../assets/images/zeroProfit.svg'
export default function ({number}) {
    return (
        <p className={`text-sm  font-[Vazirmatn] flex ${number > 0 ? 'text-3' : number === 0 ? 'text-gray-700' : 'text-[#fc0303]'}`}>
            ({number > 0 ? <img width={'30%'} src={upProfit}/> : number < 0 ? <img width={'30%'} src={downProfit}/> : <img width={'20%'} src={zeroProfit}/>}{EnglishToPersian(Math.abs(number).toString())}٪)
        </p>
    )
}