// see https://codepen.io/tobyj/pen/QjvEex
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);
};
// #region Imports
import { Disableable } from '../../../Behaviors/Disableable';
import { Themeable } from '../../../Behaviors/Themeable';
import { Attribute } from '../../../Decorators/AttributeDecorator';
import { Component } from '../../../Decorators/ComponentDecorator';
import { CustomElement } from '../../Abstracts/CustomElement';
import { lightChainElementTemplate } from './LightChainElementTemplate';
import { lightChainElementCosmopolitanStyle } from './Themes/LightChainElement.Cosmopolitan';
import { lightChainElementJoyStyle } from './Themes/LightChainElement.Joy';
import { lightChainElementMemphisStyle } from './Themes/LightChainElement.Memphis';
// #endregion
/**
 * LightChain - A decorative animated string of lights effect for festive and ambient visual enhancement.
 *
 * @description
 * The LightChain component creates an animated sequence of colorful light bulbs that simulate a string
 * of holiday or decorative lights. It generates a configurable number of individual light elements with
 * alternating colors and twinkling animation effects. The component supports three operational states:
 * 'on' for continuous illumination, 'off' for static display, and 'auto' for automated animation cycles.
 * Each light bulb is rendered with distinct styling based on its position in the sequence, creating
 * a realistic and visually appealing lighting pattern. The component can be disabled to pause animations,
 * making it ideal for seasonal decorations, festive page headers, celebration announcements, or any
 * interface requiring whimsical animated accent elements. Based on CSS animations inspired by classic
 * holiday light displays.
 *
 * @name LightChain
 * @element mosaik-light-chain
 * @category Misc
 *
 * @slot - Default slot (currently unused, lights are generated programmatically)
 *
 * @csspart root - The root container element wrapping the entire light chain
 * @csspart blub - Individual light bulb element in the chain (repeated based on count)
 *
 * @cssprop {String} --light-chain-display - The display mode for the light chain container
 * @cssprop {String} --light-chain-position - The positioning context for the light chain
 * @cssprop {String} --light-chain-width - The total width of the light chain
 * @cssprop {String} --light-chain-height - The total height of the light chain
 * @cssprop {String} --light-chain-padding - The inner spacing within the container
 * @cssprop {String} --light-chain-overflow - The overflow behavior for the container
 * @cssprop {String} --light-chain-list-style - The list style type for the bulb list
 * @cssprop {String} --light-chain-list-padding - The padding for the bulb list
 * @cssprop {String} --light-chain-list-margin - The margin for the bulb list
 * @cssprop {String} --light-chain-bulb-display - The display mode for individual bulbs
 * @cssprop {String} --light-chain-bulb-position - The positioning for individual bulbs
 * @cssprop {String} --light-chain-bulb-width - The width of each light bulb
 * @cssprop {String} --light-chain-bulb-height - The height of each light bulb
 * @cssprop {String} --light-chain-bulb-border-radius - The corner rounding for bulbs
 * @cssprop {String} --light-chain-bulb-margin - The spacing between bulbs
 * @cssprop {String} --light-chain-bulb-first-background - The background color for first bulb pattern
 * @cssprop {String} --light-chain-bulb-first-box-shadow - The glow effect for first bulb pattern
 * @cssprop {String} --light-chain-bulb-first-animation-name - The animation keyframes for first bulb
 * @cssprop {String} --light-chain-bulb-first-animation-duration - The animation duration for first bulb
 * @cssprop {String} --light-chain-bulb-first-animation-timing-function - The easing for first bulb animation
 * @cssprop {String} --light-chain-bulb-first-animation-iteration-count - The animation repeat count for first bulb
 * @cssprop {String} --light-chain-bulb-second-background - The background color for second bulb pattern
 * @cssprop {String} --light-chain-bulb-second-box-shadow - The glow effect for second bulb pattern
 * @cssprop {String} --light-chain-bulb-second-animation-name - The animation keyframes for second bulb
 * @cssprop {String} --light-chain-bulb-second-animation-duration - The animation duration for second bulb
 * @cssprop {String} --light-chain-bulb-second-animation-timing-function - The easing for second bulb animation
 * @cssprop {String} --light-chain-bulb-second-animation-iteration-count - The animation repeat count for second bulb
 * @cssprop {String} --light-chain-bulb-third-background - The background color for third bulb pattern
 * @cssprop {String} --light-chain-bulb-third-box-shadow - The glow effect for third bulb pattern
 * @cssprop {String} --light-chain-bulb-third-animation-name - The animation keyframes for third bulb
 * @cssprop {String} --light-chain-bulb-third-animation-duration - The animation duration for third bulb
 * @cssprop {String} --light-chain-bulb-third-animation-timing-function - The easing for third bulb animation
 * @cssprop {String} --light-chain-bulb-third-animation-iteration-count - The animation repeat count for third bulb
 *
 * @example
 * Basic light chain with default count (56 lights):
 * ```html
 * <mosaik-light-chain></mosaik-light-chain>
 * ```
 *
 * @example
 * Light chain with custom count:
 * ```html
 * <mosaik-light-chain count="100"></mosaik-light-chain>
 * ```
 *
 * @example
 * Light chain in different states:
 * ```html
 * <mosaik-light-chain state="on"></mosaik-light-chain>
 * <mosaik-light-chain state="off"></mosaik-light-chain>
 * <mosaik-light-chain state="auto"></mosaik-light-chain>
 * ```
 *
 * @public
 */
let LightChainElement = class LightChainElement extends Themeable(Disableable(CustomElement)) {
    // #region Fields
    _count;
    _state;
    // #endregion
    // #region Ctor
    /**
     * @public
     */
    constructor() {
        super();
        this._count = 56;
        this._state = 'off';
    }
    // #endregion
    // #region Properties
    /**
     * Returns the `is` property.
     * The `is` property represents natural name of this element.
     *
     * @public
     * @static
     * @readonly
     */
    static get is() {
        return 'mosaik-light-chain';
    }
    /**
     * Gets or sets the `count` property.
     * The number of light bulbs to render in the chain.
     * The default value is 56.
     *
     * @public
     * @attr
     */
    get count() {
        return this._count;
    }
    set count(value) {
        if (this._count !== value) {
            this._count = value;
            this.requestUpdate('count');
        }
    }
    /**
     * Gets or sets the `state` property.
     * Controls the operational state of the light chain: 'on' for continuous illumination,
     * 'off' for static display, or 'auto' for automated animation cycles.
     * The default value is 'off'.
     *
     * @public
     * @attr
     */
    get state() {
        return this._state;
    }
    set state(value) {
        if (this._state !== value) {
            this._state = value;
            this.requestUpdate('state');
        }
    }
};
__decorate([
    Attribute({ type: Number }),
    __metadata("design:type", Number),
    __metadata("design:paramtypes", [Number])
], LightChainElement.prototype, "count", null);
__decorate([
    Attribute({ type: String }),
    __metadata("design:type", String),
    __metadata("design:paramtypes", [String])
], LightChainElement.prototype, "state", null);
LightChainElement = __decorate([
    Component({
        selector: 'mosaik-light-chain',
        template: lightChainElementTemplate,
        themes: {
            joy: lightChainElementJoyStyle,
            memphis: lightChainElementMemphisStyle,
            cosmopolitan: lightChainElementCosmopolitanStyle
        },
        imports: []
    }),
    __metadata("design:paramtypes", [])
], LightChainElement);
export { LightChainElement };
//# sourceMappingURL=LightChainElement.js.map