import { __decorate, __metadata } from "tslib";
import { h, Host } from "@stencil/core";
import { BEM } from "../../utils/bem";
import { Logger } from "../../utils/log";
export class Content {
    constructor() {
        /**
         * PUBLIC PROPERTY API
         * ------------------------------------------------------
         */
        /**
         * Defines the position of the child elements if they
         * are showed verticaly or horizontally. Default is verticaly.
         */
        this.layout = 'vertical';
        /**
         * Defines the text positioning like center, end or
         * default to start.
         */
        this.align = 'start';
        /**
         * Defines the space between the child elements. Default is xx-small.
         */
        this.space = 'xx-small';
        /**
         * @internal
         * Please use layout instead.
         */
        this.direction = '';
        /**
         * @internal
         * Please use align instead.
         */
        this.alignment = '';
    }
    createLogger(log) {
        this.log = log;
    }
    /**
     * RENDER
     * ------------------------------------------------------
     */
    render() {
        const block = BEM.block('content');
        const direction = !!this.direction;
        const layout = !!this.layout;
        const alignment = !!this.alignment;
        const align = !!this.align;
        const space = !!this.space;
        let layoutValue = this.layout;
        if (direction) {
            layoutValue = this.direction === 'row' ? 'horizontal' : 'vertical';
        }
        let alignValue = this.align.split(' ').join('-');
        if (alignment) {
            alignValue = this.alignment.split(' ').join('-');
        }
        return (h(Host, { key: 'a7213517d4b70adbe0ba7091c1393d6dfdb62c9e', class: Object.assign(Object.assign(Object.assign(Object.assign({}, block.class()), block.modifier(`layout-${layoutValue}`).class(layout || direction)), block.modifier(`align-${alignValue}`).class(align || alignment)), block.modifier(`space-${this.space}`).class(space)) }, h("slot", { key: 'd907c3d66bf4927b63cfa6958288e3eb38e9d4be' })));
    }
    static get is() { return "bal-content"; }
    static get originalStyleUrls() {
        return {
            "$": ["./bal-content.sass"]
        };
    }
    static get styleUrls() {
        return {
            "$": ["bal-content.css"]
        };
    }
    static get properties() {
        return {
            "layout": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "BalProps.BalContentLayout",
                    "resolved": "\"\" | \"horizontal\" | \"vertical\"",
                    "references": {
                        "BalProps": {
                            "location": "global",
                            "id": "global::BalProps"
                        }
                    }
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "Defines the position of the child elements if they\nare showed verticaly or horizontally. Default is verticaly."
                },
                "getter": false,
                "setter": false,
                "reflect": false,
                "attribute": "layout",
                "defaultValue": "'vertical'"
            },
            "align": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "BalProps.BalContentAlignment",
                    "resolved": "\"\" | \"center\" | \"end\" | \"start\"",
                    "references": {
                        "BalProps": {
                            "location": "global",
                            "id": "global::BalProps"
                        }
                    }
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "Defines the text positioning like center, end or\ndefault to start."
                },
                "getter": false,
                "setter": false,
                "reflect": false,
                "attribute": "align",
                "defaultValue": "'start'"
            },
            "space": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "BalProps.BalContentSpace",
                    "resolved": "\"\" | \"none\" | \"normal\" | \"small\" | \"x-small\" | \"xx-small\" | \"xxx-small\"",
                    "references": {
                        "BalProps": {
                            "location": "global",
                            "id": "global::BalProps"
                        }
                    }
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "Defines the space between the child elements. Default is xx-small."
                },
                "getter": false,
                "setter": false,
                "reflect": false,
                "attribute": "space",
                "defaultValue": "'xx-small'"
            },
            "direction": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "BalProps.BalStackDirection",
                    "resolved": "\"\" | \"column\" | \"row\"",
                    "references": {
                        "BalProps": {
                            "location": "global",
                            "id": "global::BalProps"
                        }
                    }
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [{
                            "name": "internal",
                            "text": "Please use layout instead."
                        }],
                    "text": ""
                },
                "getter": false,
                "setter": false,
                "reflect": false,
                "attribute": "direction",
                "defaultValue": "''"
            },
            "alignment": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "BalProps.BalStackAlignment",
                    "resolved": "\"\" | \"bottom center\" | \"bottom end\" | \"bottom start\" | \"center\" | \"end\" | \"start\" | \"top center\" | \"top end\" | \"top start\"",
                    "references": {
                        "BalProps": {
                            "location": "global",
                            "id": "global::BalProps"
                        }
                    }
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [{
                            "name": "internal",
                            "text": "Please use align instead."
                        }],
                    "text": ""
                },
                "getter": false,
                "setter": false,
                "reflect": false,
                "attribute": "alignment",
                "defaultValue": "''"
            }
        };
    }
}
__decorate([
    Logger('bal-content'),
    __metadata("design:type", Function),
    __metadata("design:paramtypes", [Function]),
    __metadata("design:returntype", void 0)
], Content.prototype, "createLogger", null);
