@addToRepeatables: ~`addToRepeatables =
    (function () {
        var names = '';
        return function (name) {
            if (typeof name == 'string' && name.length) {
                names = names + (names.length ? ',' : '') + name;
            }

            return names;
        }
    })()`;

.repeatableBg(@name: '') {
    @repeatableBgNames: ~`addToRepeatables(@{name})`;
}

@addToNotRepeatablesSprited: ~`addToNotRepeatablesSprited =
    (function () {
        var names = '';
        return function (name) {
            if (typeof name == 'string' && name.length) {
                names = names + (names.length ? ',' : '') + name;
            }

            return names;
        }
    })()`;

@addToNotRepeatablesNotSprited: ~`addToNotRepeatablesNotSprited =
    (function () {
        var names = '';
        return function (name) {
            if (typeof name == 'string' && name.length) {
                names = names + (names.length ? ',' : '') + name;
            }

            return names;
        }
    })()`;

.notRepeatableBg(@name: ''; @newerNotUseSprite: false) {
    @notRepeatableBgNamesSprited: ~`addToNotRepeatablesSprited()`;
    @notRepeatableBgNamesNotSprited: ~`addToNotRepeatablesNotSprited()`;

    & when not (@newerNotUseSprite) {
        @notRepeatableBgNamesSprited: ~`addToNotRepeatablesSprited(@{name})`;
    }
    & when (@newerNotUseSprite) {
        @notRepeatableBgNamesNotSprited: ~`addToNotRepeatablesNotSprited(@{name})`;
    }
}

.notRepeatableBgWithSizes(@name; @newerNotUseSprite: false) {
    .notRepeatableBg(@name: ''; @newerNotUseSprite: false);
}

.alphaImage(@name: '') {
    @notRepeatableBgNamesNotSprited: ~`addToNotRepeatablesNotSprited(@{name})`;
}
