// #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 { DomServiceLocator } from '../../../../Dom/Dom';
import { Disableable } from '../../../Behaviors/Disableable';
import { Themeable } from '../../../Behaviors/Themeable';
import { addInheritanceConsumerController } from '../../../Controllers/InheritanceConsumerController';
import { Attribute } from '../../../Decorators/AttributeDecorator';
import { Component } from '../../../Decorators/ComponentDecorator';
import { SelectorItemElement } from '../Abstracts/Selector/SelectorItemElement';
import { CarouselElement } from './CarouselElement';
import { CAROUSEL_INHERITANCE_CONTEXT } from './CarouselInheritanceContext';
import { carouselItemElementTemplate } from './CarouselItemElementTemplate';
import { carouselItemElementCosmopolitanStyle } from './Themes/CarouselItemElement.Cosmopolitan';
import { carouselItemElementJoyStyle } from './Themes/CarouselItemElement.Joy';
import { carouselItemElementMemphisStyle } from './Themes/CarouselItemElement.Memphis';
// #endregion
/**
 * CarouselItem - An individual content slide within a carousel navigation component.
 *
 * Represents a single content item that can be displayed within a carousel layout.
 * Contains content such as images, cards, text, or any other elements that need
 * to be presented in the carousel's sliding presentation format.
 *
 * @name CarouselItemElement
 * @element mosaik-carousel-item
 * @category Selectors
 *
 * @slot - Default content area for the carousel item's content
 *
 * @cssprop {String} --carousel-item-font-family - The item font family CSS custom property.
 * @cssprop {String} --carousel-item-font-letter-spacing - The item font letter spacing CSS custom property.
 * @cssprop {String} --carousel-item-font-line-height - The item font line height CSS custom property.
 * @cssprop {String} --carousel-item-font-size - The item font size CSS custom property.
 * @cssprop {String} --carousel-item-font-text-decoration - The item font text decoration CSS custom property.
 * @cssprop {String} --carousel-item-font-text-transform - The item font text transform CSS custom property.
 * @cssprop {String} --carousel-item-font-weight - The item font weight CSS custom property.
 * @cssprop {String} --carousel-item-gap - The item gap CSS custom property.
 * @cssprop {String} --carousel-item-padding-bottom - The item padding bottom CSS custom property.
 * @cssprop {String} --carousel-item-padding-left - The item padding left CSS custom property.
 * @cssprop {String} --carousel-item-padding-right - The item padding right CSS custom property.
 * @cssprop {String} --carousel-item-padding-top - The item padding top CSS custom property.
 * @cssprop {String} --carousel-item-shadow - The item shadow CSS custom property.
 * @cssprop {String} --carousel-item-shadow-blur - The item shadow blur CSS custom property.
 * @cssprop {String} --carousel-item-shadow-color - The item shadow color CSS custom property.
 * @cssprop {String} --carousel-item-shadow-offset-x - The item shadow offset x CSS custom property.
 * @cssprop {String} --carousel-item-shadow-offset-y - The item shadow offset y CSS custom property.
 * @cssprop {String} --carousel-item-shadow-spread - The item shadow spread CSS custom property.
 * @cssprop {String} --carousel-item-transition-duration - The item transition duration CSS custom property.
 * @cssprop {String} --carousel-item-transition-mode - The item transition mode CSS custom property.
 * @cssprop {String} --carousel-item-transition-property - The item transition property CSS custom property.
 * @cssprop {String} --carousel-item-translate - The item translate CSS custom property.
 *
 * @example
 * ```html
 * <!-- Image carousel item -->
 * <mosaik-carousel-item>
 *   <mosaik-image src="hero-banner.jpg" alt="Featured product"></mosaik-image>
 *   <div class="overlay">
 *     <h2>New Collection</h2>
 *     <mosaik-button appearance="primary">Shop Now</mosaik-button>
 *   </div>
 * </mosaik-carousel-item>
 *
 * <!-- Card carousel item -->
 * <mosaik-carousel-item>
 *   <mosaik-card appearance="elevated">
 *     <mosaik-avatar slot="header" src="user.jpg"></mosaik-avatar>
 *     <mosaik-text slot="header">John Smith</mosaik-text>
 *     <mosaik-text>"This product changed everything for our team!"</mosaik-text>
 *     <mosaik-rating slot="footer" value="5" readonly></mosaik-rating>
 *   </mosaik-card>
 * </mosaik-carousel-item>
 *
 * <!-- Feature carousel item -->
 * <mosaik-carousel-item>
 *   <div class="feature-content">
 *     <mosaik-icon size="large"></mosaik-icon>
 *     <mosaik-text variant="headline">Analytics Dashboard</mosaik-text>
 *     <mosaik-text>Track your performance with detailed insights</mosaik-text>
 *   </div>
 * </mosaik-carousel-item>
 * ```
 *
 * @public
 */
let CarouselItemElement = class CarouselItemElement extends Themeable(Disableable(SelectorItemElement)) {
    // #region Fields
    _inheritance = addInheritanceConsumerController(this, {
        context: CAROUSEL_INHERITANCE_CONTEXT
    });
    _isDismissed;
    _isActive;
    _dismissDirection;
    _timeout;
    // #endregion
    // #region Ctor
    /**
     * @public
     */
    constructor() {
        super();
        this._isDismissed = false;
        this._isActive = false;
        this._dismissDirection = null;
        this._timeout = null;
    }
    // #endregion
    // #region Properties
    /**
     * Returns the `is` property.
     * The `is` property represents natural name of this element.
     *
     * @public
     * @static
     * @readonly
     */
    static get is() {
        return 'mosaik-carousel-item';
    }
    /**
     * @inheritdoc
     * When used inside a Carousel, inherits the carousel's disabled state unless explicitly set.
     *
     * @public
     * @override
     */
    get disabled() {
        return this._inheritance.get('disabled', super.disabled);
    }
    set disabled(value) {
        this._inheritance.markExplicit('disabled');
        super.disabled = value;
    }
    /**
     * Gets or sets the `isDismissed` property.
     * Indicates whether this item has been dismissed (swiped past) in deck display mode.
     *
     * @public
     * @attr is-dismissed
     */
    get isDismissed() {
        return this._isDismissed;
    }
    set isDismissed(value) {
        if (this._isDismissed !== value) {
            this._isDismissed = value;
            this.requestUpdate('isDismissed');
        }
    }
    /**
     * Gets or sets the `isActive` property.
     * Indicates whether this item is the currently active card in deck display mode.
     *
     * @public
     * @attr is-active
     */
    get isActive() {
        return this._isActive;
    }
    set isActive(value) {
        if (this._isActive !== value) {
            this._isActive = value;
            this.requestUpdate('isActive');
        }
    }
    /**
     * Gets or sets the `dismissDirection` property.
     * Indicates the direction this card is being dismissed or arriving from
     * in deck display mode. Used by CSS to determine animation direction.
     *
     * @public
     * @attr dismiss-direction
     */
    get dismissDirection() {
        return this._dismissDirection;
    }
    set dismissDirection(value) {
        if (this._dismissDirection !== value) {
            this._dismissDirection = value;
            this.requestUpdate('dismissDirection');
        }
    }
    /**
     * Gets or sets the `timeout` property.
     * Optional override for the autoplay timeout duration specific to this item.
     * If set, this value takes precedence over the parent Carousel's `timeout` when advancing to the next item.
     * When null (default), the parent Carousel's timeout is used.
     * Must be greater than 0 if set.
     *
     * @public
     * @attr
     */
    get timeout() {
        return this._timeout;
    }
    set timeout(value) {
        if (this._timeout !== value) {
            this._timeout = value;
            this.requestUpdate('timeout');
        }
    }
    /**
     * Get the item parent.
     *
     * @public
     * @readonly
     */
    get parent() {
        return DomServiceLocator.current.findAncestor(this, CarouselElement.is, { strict: true });
    }
};
__decorate([
    Attribute({ type: Boolean }),
    __metadata("design:type", Boolean),
    __metadata("design:paramtypes", [Boolean])
], CarouselItemElement.prototype, "isDismissed", null);
__decorate([
    Attribute({ type: Boolean }),
    __metadata("design:type", Boolean),
    __metadata("design:paramtypes", [Boolean])
], CarouselItemElement.prototype, "isActive", null);
__decorate([
    Attribute({ type: String }),
    __metadata("design:type", Object),
    __metadata("design:paramtypes", [Object])
], CarouselItemElement.prototype, "dismissDirection", null);
__decorate([
    Attribute({ type: Number }),
    __metadata("design:type", Object),
    __metadata("design:paramtypes", [Object])
], CarouselItemElement.prototype, "timeout", null);
CarouselItemElement = __decorate([
    Component({
        selector: 'mosaik-carousel-item',
        template: carouselItemElementTemplate,
        themes: {
            joy: carouselItemElementJoyStyle,
            memphis: carouselItemElementMemphisStyle,
            cosmopolitan: carouselItemElementCosmopolitanStyle
        },
        imports: []
    }),
    __metadata("design:paramtypes", [])
], CarouselItemElement);
export { CarouselItemElement };
//# sourceMappingURL=CarouselItemElement.js.map