import { a as defaultLocale } from './config.default-RE8-gLMQ.js';
import { g as useBalConfig } from './config.utils-B7jugjyM.js';

const getLocale = () => {
    const config = useBalConfig();
    // workaround for swiss french locale which uses non standard number formatting
    if (config && config.locale && config.locale === 'fr-CH') {
        return 'de-CH';
    }
    return (config && config.locale) || defaultLocale;
};
function getDecimalSeparator() {
    return Intl.NumberFormat(getLocale())
        .format(1.1)
        .replace(/\p{Number}/gu, '');
}
function getThousandSeparator() {
    return Intl.NumberFormat(getLocale())
        .format(11111)
        .replace(/\p{Number}/gu, '');
}
function formatLocaleNumber(number, minimumFractionDigits) {
    const options = minimumFractionDigits !== undefined ? { minimumFractionDigits, maximumFractionDigits: minimumFractionDigits } : {};
    const formattedNumber = Intl.NumberFormat(getLocale(), Object.assign({}, options)).format(number);
    if (formattedNumber === 'NaN') {
        return '';
    }
    return formattedNumber;
}
const getNegativeSymbol = () => {
    return '-';
};

export { getDecimalSeparator as a, getThousandSeparator as b, formatLocaleNumber as f, getNegativeSymbol as g };
