"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.UICol = void 0;
var aurelia_framework_1 = require("aurelia-framework");
var UICol = exports.UICol = (function () {
    function UICol(element) {
        this.element = element;
        this.size = "";
        this.width = "unset";
        this.maxWidth = "unset";
        this.minWidth = "unset";
        this.align = "";
        if (element.hasAttribute("content-stretch")) {
            element.classList.add("content-stretch");
        }
    }
    Object.defineProperty(UICol.prototype, "sizes", {
        get: function () {
            return this.size
                .split(" ")
                .map(function (s) { return "ui-col--".concat(s.trim()); })
                .join(" ");
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(UICol.prototype, "classes", {
        get: function () {
            var classes = ["ui-col"];
            if (this.align) {
                classes.push("ui-col--".concat(this.align));
            }
            if (this.size) {
                classes.push(this.sizes);
            }
            return classes.join(" ");
        },
        enumerable: false,
        configurable: true
    });
    __decorate([
        (0, aurelia_framework_1.bindable)(),
        __metadata("design:type", String)
    ], UICol.prototype, "size", void 0);
    __decorate([
        (0, aurelia_framework_1.bindable)(),
        __metadata("design:type", String)
    ], UICol.prototype, "width", void 0);
    __decorate([
        (0, aurelia_framework_1.bindable)(),
        __metadata("design:type", String)
    ], UICol.prototype, "maxWidth", void 0);
    __decorate([
        (0, aurelia_framework_1.bindable)(),
        __metadata("design:type", String)
    ], UICol.prototype, "minWidth", void 0);
    __decorate([
        (0, aurelia_framework_1.bindable)(),
        __metadata("design:type", String)
    ], UICol.prototype, "align", void 0);
    __decorate([
        (0, aurelia_framework_1.computedFrom)("align", "size"),
        __metadata("design:type", String),
        __metadata("design:paramtypes", [])
    ], UICol.prototype, "classes", null);
    UICol = __decorate([
        (0, aurelia_framework_1.customElement)("ui-col"),
        (0, aurelia_framework_1.inlineView)("<template class.bind='classes' css.bind=\"{ width, maxWidth, minWidth}\"><slot></slot></template>"),
        __metadata("design:paramtypes", [Element])
    ], UICol);
    return UICol;
}());

//# sourceMappingURL=ui-col.js.map
