module.exports = {
    ApiUrl: '@@apiEndpoint',
    DefaultPageSize: 24,
    ItemGroupIdOfStartPage: "1",
    ItemGroupIdOfEmptyCartPage: "1",
    FormatCurrency: function(amount_s) {
        var amount = parseFloat(amount_s);
        return (amount.toFixed(2) + " KM")
    },
    FormatPercentage: function(amount_s) {
        var amount = parseFloat(amount_s);
        return (amount.toFixed(2) + "%")
    },
    MaxNumberOfItemsToBeAdded: 1000,

    Slugify: function(text) {
        return text.toString().toLowerCase()
            .replace(/š/g,'s')
            .replace(/[čć]/g,'c')
            .replace(/[ž]/g,'z')
            .replace(/\s+/g, '-') // Replace spaces with -
            .replace(/[^\w\-]+/g, '') // Remove all non-word chars
            .replace(/\-\-+/g, '-') // Replace multiple - with single -
            .replace(/^-+/, '') // Trim - from start of text
            .replace(/-+$/, ''); // Trim - from end of text
    }
};
