// #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 { Themeable } from '../../../../Controls/Behaviors/Themeable';
import { Attribute } from '../../../Decorators/AttributeDecorator';
import { Component } from '../../../Decorators/ComponentDecorator';
import { CustomElement } from '../../Abstracts/CustomElement';
import { IconElement } from '../../Media/Icon/IconElement';
import { breadcrumbItemElementTemplate } from './BreadcrumbItemElementTemplate';
import { breadcrumbItemElementJoyStyle } from './Themes/BreadcrumbItemElement.Joy';
import { breadcrumbItemElementRetroStyle } from './Themes/BreadcrumbItemElement.Retro';
import { breadcrumbItemElementCosmopolitanStyle } from './Themes/BreadcrumbItemElement.Cosmopolitan';
// #endregion
/**
 * Breadcrumb Item - A component representing an individual link or label within a breadcrumb navigation trail.
 *
 * @description
 * The `Breadcrumb Item` component is used as a single element in a breadcrumb navigation trail. It can act as a link to navigate
 * to a previous section of the hierarchy or as a label for the current page. Breadcrumb items are commonly used in conjunction
 * with the `Breadcrumb` component to create a complete navigation trail.
 *
 * @name Breadcrumb Item
 * @element mosaik-breadcrumb-item
 * @category Navigation
 *
 * @slot - The content of the breadcrumb item, typically text or an icon.
 *
 * @dependency {IconElement} - The Icon element.
 *
 * @example
 * ```html
 * <mosaik-breadcrumb>
 *   <mosaik-breadcrumb-item href="/home">Home</mosaik-breadcrumb-item>
 *   <mosaik-breadcrumb-item href="/category">Category</mosaik-breadcrumb-item>
 *   <mosaik-breadcrumb-item href="/subcategory">Subcategory</mosaik-breadcrumb-item>
 *   <mosaik-breadcrumb-item>Current Page</mosaik-breadcrumb-item>
 * </mosaik-breadcrumb>
 * ```
 *
 * @public
 */
let BreadcrumbItemElement = class BreadcrumbItemElement extends Themeable(CustomElement) {
    // #region Fields
    _isActive;
    // #endregion
    // #region Ctor
    /**
     * @public
     */
    constructor() {
        super();
        this._isActive = false;
    }
    // #endregion
    // #region Properties
    /**
     * Returns the `{@link is}` property.
     * The `{@link is}` property represents natural name of this element.
     *
     * @public
     * @static
     * @readonly
     */
    static get is() {
        return 'mosaik-breadcrumb-item';
    }
    /**
     * Gets or sets the `isActive` property.
     *
     * @public
     * @attr
     */
    get isActive() {
        return this._isActive;
    }
    set isActive(value) {
        if (this._isActive !== value) {
            this._isActive = value;
            this.requestUpdate('isActive');
        }
    }
    // #endregion
    // #region Methods
    /**
     * @public
     */
    firstItem() {
        const children = Array.prototype.slice.call(this.parentElement?.children);
        return children.indexOf(this) === 0;
    }
};
__decorate([
    Attribute({
        type: Boolean,
        useDefault: true
    }),
    __metadata("design:type", Boolean),
    __metadata("design:paramtypes", [Boolean])
], BreadcrumbItemElement.prototype, "isActive", null);
BreadcrumbItemElement = __decorate([
    Component({
        selector: 'mosaik-breadcrumb-item',
        template: breadcrumbItemElementTemplate,
        themes: {
            joy: breadcrumbItemElementJoyStyle,
            retro: breadcrumbItemElementRetroStyle,
            cosmopolitan: breadcrumbItemElementCosmopolitanStyle
        },
        imports: [
            IconElement
        ]
    }),
    __metadata("design:paramtypes", [])
], BreadcrumbItemElement);
export { BreadcrumbItemElement };
//# sourceMappingURL=BreadcrumbItemElement.js.map