import { r as registerInstance, h, H as Host } from './index-BdVwMG9u.js';
import { _ as __decorate, a as __metadata } from './tslib.es6-dfXERft2.js';
import { B as BEM } from './bem-ByiN-QjD.js';
import { L as Logger } from './log-CwssmmaV.js';
import './browser-B1u-Mq75.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) {
        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.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' })));
    }
};
__decorate([
    Logger('bal-content'),
    __metadata("design:type", Function),
    __metadata("design:paramtypes", [Function]),
    __metadata("design:returntype", void 0)
], Content.prototype, "createLogger", null);
Content.style = balContentCss;

export { Content as bal_content };
