import { n as useBalConfig, U as defaultLocale } from './index-CklISCW5.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() {
    console.log('getDecimalSeparator called', getLocale());
    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 };
