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;
};
import { MelodicComponent } from '@melodicdev/core';
import { containerTemplate } from './container.template.js';
import { containerStyles } from './container.styles.js';
/**
 * ml-container - Content width constraint wrapper
 *
 * @example
 * ```html
 * <ml-container>
 *   <p>Centered content with max-width</p>
 * </ml-container>
 *
 * <ml-container size="sm" padding="6">
 *   <p>Narrow container with extra padding</p>
 * </ml-container>
 * ```
 *
 * @slot default - Container content
 */
let ContainerComponent = class ContainerComponent {
    constructor() {
        /** Max-width preset */
        this.size = 'lg';
        /** Horizontal padding (spacing scale: 1-12) */
        this.padding = '4';
        /** Center the container with auto margins */
        this.centered = true;
    }
    getStyles() {
        const maxWidthMap = {
            sm: '640px',
            md: '768px',
            lg: '1024px',
            xl: '1280px',
            full: '100%'
        };
        return {
            'max-width': maxWidthMap[this.size],
            'padding-left': `var(--ml-space-${this.padding})`,
            'padding-right': `var(--ml-space-${this.padding})`,
            'margin-left': this.centered ? 'auto' : '0',
            'margin-right': this.centered ? 'auto' : '0'
        };
    }
};
ContainerComponent = __decorate([
    MelodicComponent({
        selector: 'ml-container',
        template: containerTemplate,
        styles: containerStyles,
        attributes: ['size', 'padding', 'centered']
    })
], ContainerComponent);
export { ContainerComponent };
