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 { stepTemplate } from './step.template.js';
import { stepStyles } from './step.styles.js';
/**
 * ml-step - Individual step header for use within ml-steps
 *
 * @example
 * ```html
 * <ml-steps active="step1">
 *   <ml-step slot="step" value="step1" label="Your details" description="Name and email"></ml-step>
 *   <ml-step slot="step" value="step2" label="Company" description="Your company details"></ml-step>
 * </ml-steps>
 * ```
 */
let StepComponent = class StepComponent {
    constructor() {
        /** Step identifier */
        this.value = '';
        /** Step title */
        this.label = '';
        /** Secondary description text */
        this.description = '';
        /** Icon name (for icons variant) */
        this.icon = '';
        /** URL for routed mode */
        this.href = '';
        /** Disable this step */
        this.disabled = false;
        /** Step status (managed by parent) */
        this.status = 'upcoming';
        /** Visual variant (managed by parent) */
        this.variant = 'numbered';
        /** Connector style (managed by parent) */
        this.connector = 'solid';
        /** Accent color (managed by parent) */
        this.color = 'primary';
        /** Layout orientation (managed by parent) */
        this.orientation = 'horizontal';
        /** Step number (managed by parent) */
        this['step-number'] = '1';
        /** First step flag (managed by parent) */
        this.first = false;
        /** Last step flag (managed by parent) */
        this.last = false;
        /** Compact/dots mode (managed by parent) */
        this.compact = false;
        /** Handle click on step */
        this.handleClick = () => {
            if (this.disabled)
                return;
            this.elementRef.dispatchEvent(new CustomEvent('ml:step-click', {
                bubbles: true,
                composed: true,
                detail: { value: this.value, href: this.href }
            }));
        };
    }
};
StepComponent = __decorate([
    MelodicComponent({
        selector: 'ml-step',
        template: stepTemplate,
        styles: stepStyles,
        attributes: ['value', 'label', 'description', 'icon', 'disabled', 'status', 'variant', 'connector', 'color', 'orientation', 'step-number', 'first', 'last', 'compact']
    })
], StepComponent);
export { StepComponent };
