export const formatPrice = (
  price: number,
  currencySymbol?: string,
  currencyCode?: string,
  locale?: Locale,
) => {
  const symbol = currencySymbol ?? '$';
  const priceFormatted = price.toLocaleString(locale?.code);

  return `${currencyCode ? `${currencyCode} ` : ''}${symbol}${priceFormatted}`;
};
