import React from "react"; import { useTranslation } from "react-i18next"; import { useAppSelector } from "redux/hooks"; import ProText from "../ProText"; interface ArabicPriceProps { price: number | string; style?: React.CSSProperties; strong?: boolean; type?: "secondary" | "success" | "warning" | "danger"; className?: string; } const ArabicPrice: React.FC = ({ price, style = {}, strong = false, type, className, }) => { const { t } = useTranslation(); const { isRTL } = useAppSelector((state) => state.locale); // Format the price to ensure it has 2 decimal places const formattedPrice = typeof price === "number" ? price.toFixed(2) : price; return ( {isRTL ? ( <> {formattedPrice} {t("common.omanCurrency")} ) : ( <> {formattedPrice} {t("common.omanCurrency")} )} ); }; export default ArabicPrice;