// #region Imports
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;
};
var __metadata = (this && this.__metadata) || function (k, v) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
import { Orientable } from '../../../Behaviors/Orientable';
import { Themeable } from '../../../Behaviors/Themeable';
import { Attribute } from '../../../Decorators/AttributeDecorator';
import { Component } from '../../../Decorators/ComponentDecorator';
import { Orientation } from '../../../Types/Orientation';
import { TimelineAlignment } from '../../../Types/TimelineAlignment';
import { CustomElement } from '../../Abstracts/CustomElement';
import { timelineElementCosmopolitanStyle } from './Themes/TimelineElement.Cosmopolitan';
import { timelineElementJoyStyle } from './Themes/TimelineElement.Joy';
import { timelineElementMemphisStyle } from './Themes/TimelineElement.Memphis';
import { TimelineContentElement } from './TimelineContentElement';
import { timelineElementTemplate } from './TimelineElementTemplate';
import { TimelineItemElement } from './TimelineItemElement';
import { TimelineMarkerElement } from './TimelineMarkerElement';
import { TimelineOppositeElement } from './TimelineOppositeElement';
// #endregion
/**
 * Timeline - A sequential visualization of events or steps along a line.
 *
 * @description
 * The Timeline component renders a list of `TimelineItemElement` children
 * along a connecting line. It supports vertical and horizontal orientations
 * as well as start, end, and alternating alignment modes.
 *
 * @name Timeline
 * @element mosaik-timeline
 * @category Layouts
 *
 * @slot - Default slot for `TimelineItemElement` children.
 *
 * @csspart line - The visual connector line running through the timeline.
 *
 * @cssprop {String} --timeline-content-gap - Gap between content areas
 * @cssprop {String} --timeline-font-family - Font family for timeline text
 * @cssprop {String} --timeline-font-letter-spacing - Letter spacing for timeline text
 * @cssprop {String} --timeline-font-line-height - Line height for timeline text
 * @cssprop {String} --timeline-font-size - Font size for timeline text
 * @cssprop {String} --timeline-font-text-decoration - Text decoration for timeline text
 * @cssprop {String} --timeline-font-text-transform - Text transform for timeline text
 * @cssprop {String} --timeline-font-weight - Font weight for timeline text
 * @cssprop {Color} --timeline-foreground-color - Text color of the timeline
 * @cssprop {String} --timeline-gap - Gap between timeline items
 * @cssprop {Color} --timeline-line-color - Color of the connecting line
 * @cssprop {String} --timeline-line-offset - Offset position of the timeline line
 * @cssprop {String} --timeline-line-thickness - Thickness of the connecting line
 * @cssprop {Color} --timeline-marker-border-color - Border color of the marker
 * @cssprop {String} --timeline-marker-border-width - Border width of the marker
 * @cssprop {Color} --timeline-marker-color - Background color of the marker
 * @cssprop {String} --timeline-marker-size - Size of the timeline marker
 * @cssprop {String} --timeline-padding-bottom - Bottom padding of the timeline
 * @cssprop {String} --timeline-padding-left - Left padding of the timeline
 * @cssprop {String} --timeline-padding-right - Right padding of the timeline
 * @cssprop {String} --timeline-padding-top - Top padding of the timeline
 * @cssprop {String} --timeline-shadow - The shadow CSS custom property.
 * @cssprop {String} --timeline-shadow-blur - The shadow blur CSS custom property.
 * @cssprop {String} --timeline-shadow-color - The shadow color CSS custom property.
 * @cssprop {String} --timeline-shadow-offset-x - The shadow offset x CSS custom property.
 * @cssprop {String} --timeline-shadow-offset-y - The shadow offset y CSS custom property.
 * @cssprop {String} --timeline-shadow-spread - The shadow spread CSS custom property.
 * @cssprop {String} --timeline-transition-duration - Transition duration
 * @cssprop {String} --timeline-transition-mode - Transition timing function
 * @cssprop {String} --timeline-transition-property - Properties that transition
 * @cssprop {String} --timeline-translate - CSS translate offset
 *
 * @fires connected {ConnectedEvent} - Fired when connected to DOM
 * @fires changed {PropertyChangedEvent} - Fired when a property changes
 *
 * @example
 * Vertical timeline:
 * ```html
 * <mosaik-timeline orientation="vertical" align="start">
 *   <mosaik-timeline-item>
 *     <mosaik-timeline-marker text="1" variant="primary" appearance="solid"></mosaik-timeline-marker>
 *     <mosaik-timeline-content>Step one</mosaik-timeline-content>
 *   </mosaik-timeline-item>
 * </mosaik-timeline>
 * ```
 *
 * @public
 */
let TimelineElement = class TimelineElement extends Themeable(Orientable(CustomElement)) {
    // #region Fields
    _align;
    // #endregion
    // #region Ctor
    /**
     * Constructs a new instance of the `TimelineElement` class.
     *
     * @public
     */
    constructor() {
        super();
        // TODO: REMARK: This is a workaround for the issue with the docs generation.
        // If we set the orientation property like this `this.orientation = Orientation.Vertical;` the
        // docs generation will generates a wrong type.
        Object.assign(this, { orientation: Orientation.Vertical });
        this._align = TimelineAlignment.Start;
    }
    // #endregion
    // #region Properties
    /**
     * Returns the `is` property.
     *
     * @public
     * @static
     * @readonly
     */
    static get is() {
        return 'mosaik-timeline';
    }
    /**
     * Gets or sets the `align` property.
     *
     * @public
     * @attr
     */
    get align() {
        return this._align;
    }
    set align(value) {
        if (this._align !== value) {
            this._align = value;
            this.requestUpdate('align');
        }
    }
};
__decorate([
    Attribute({ type: String }),
    __metadata("design:type", String),
    __metadata("design:paramtypes", [String])
], TimelineElement.prototype, "align", null);
TimelineElement = __decorate([
    Component({
        selector: 'mosaik-timeline',
        template: timelineElementTemplate,
        themes: {
            joy: timelineElementJoyStyle,
            memphis: timelineElementMemphisStyle,
            cosmopolitan: timelineElementCosmopolitanStyle
        },
        host: {
            role: 'list'
        },
        imports: [
            TimelineItemElement,
            TimelineMarkerElement,
            TimelineContentElement,
            TimelineOppositeElement
        ]
    }),
    __metadata("design:paramtypes", [])
], TimelineElement);
export { TimelineElement };
//# sourceMappingURL=TimelineElement.js.map