import { URLManager } from "../modules";
import { useGetPartyV1PublicDomainSetting } from "../services";

export const useDefaultCurrency = () => {
  const { data } = useGetPartyV1PublicDomainSetting({
    placeholderData: {
      defaultCryptoCurrencySymbol: "BTC",
      defaultFiatCurrencySymbol: __PRODUCTION__ ? "IRT" : "IRR",
      minimumValueForHideSmallBalance: 1,
    },
  });
  const defaultCurrency =
    URLManager.getDomainName() === "hitobit" && __PRODUCTION__ ? "IRT" : "IRR";
  return {
    defaultCurrency: data?.defaultFiatCurrencySymbol || defaultCurrency,
    defaultCrypto: data?.defaultCryptoCurrencySymbol || "BTC",
    minimumValueForHideSmallBalance: data?.minimumValueForHideSmallBalance || 1,
  };
};
