define(["require", "exports", "./Breakpoints"], function (require, exports, Breakpoints_1) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    var Lazysizes = /** @class */ (function () {
        function Lazysizes() {
            this.config = window['lazySizesConfig'] || {};
            this.stopAutoInit();
            this.createCustomMedia();
            window['lazySizesConfig'] = this.config;
            this.init();
        }
        Lazysizes.configure = function () {
            return new Lazysizes;
        };
        Lazysizes.prototype.stopAutoInit = function () {
            this.config.init = false;
        };
        Lazysizes.prototype.createCustomMedia = function () {
            var customMedia = {};
            var sizes = Object.keys(Breakpoints_1.Breakpoints);
            for (var i = 0; i < sizes.length; i++) {
                if (!sizes[i + 1]) {
                    break;
                }
                customMedia["--" + sizes[i]] = "(max-width: " + Breakpoints_1.Breakpoints[sizes[i + 1]] + "px)";
            }
            this.config.customMedia = customMedia;
        };
        Lazysizes.prototype.init = function () {
            require(['lazysizes'], function (lazySizes) {
                lazySizes.init();
            });
        };
        return Lazysizes;
    }());
    exports.Lazysizes = Lazysizes;
});
//# sourceMappingURL=Lazysizes.js.map