export const currency = (money, currency = { code_en: activeCurrency() }) => {
    return (
        new Intl.NumberFormat("en-US", {
            style: "currency",
            currency: currency?.code_en || activeCurrency(),
            currencyDisplay: "narrowSymbol",
            maximumFractionDigits: 2,
            minimumFractionDigits: 0,
        }).format(money) + (currency.code_en == "USD" ? " USD" : "")
    );
};
export const activeCurrency = () => {
    return localStorage.getItem("currency") || "USD";
};
