'use strict';

var index = require('./index-feA4skrY.js');
var tslib_es6 = require('./tslib.es6-DrfCPgT9.js');
var bem = require('./bem-p0PWVN8n.js');
var log = require('./log-CXDMiw7o.js');
require('./browser-BwmkTmm8.js');

const balContentCss = ".bal-content{display:-ms-flexbox;display:flex;-ms-flex:1;flex:1;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:start;align-items:flex-start;text-align:left;gap:.25rem}.bal-content--align-center{-ms-flex-align:center;align-items:center;text-align:center}.bal-content--align-end{-ms-flex-align:end;align-items:flex-end;text-align:right}.bal-content--layout-horizontal{-ms-flex-direction:row;flex-direction:row}.bal-content--layout-vertical{-ms-flex-direction:column;flex-direction:column}.bal-content--space-none{gap:0rem}.bal-content--space-xxx-small{gap:.125rem}.bal-content--space-xx-small{gap:.25rem}.bal-content--space-x-small{gap:.5rem}.bal-content--space-small{gap:.75rem}.bal-content--space-normal{gap:1rem}.bal-content>.bal-text{margin:0}";

const Content = class {
    constructor(hostRef) {
        index.registerInstance(this, hostRef);
        /**
         * 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.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 (index.h(index.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)) }, index.h("slot", { key: 'd907c3d66bf4927b63cfa6958288e3eb38e9d4be' })));
    }
};
tslib_es6.__decorate([
    log.Logger('bal-content'),
    tslib_es6.__metadata("design:type", Function),
    tslib_es6.__metadata("design:paramtypes", [Function]),
    tslib_es6.__metadata("design:returntype", void 0)
], Content.prototype, "createLogger", null);
Content.style = balContentCss;

exports.bal_content = Content;
