/**
 * Copyright Aquera Inc 2023
 *
 * This source code is licensed under the BSD-3-Clause license found in the
 * LICENSE file in the root directory of this source tree.
 */
import { __decorate } from "tslib";
import { html, } from 'lit';
import { customElement, state, property } from 'lit/decorators.js';
import { classMap } from 'lit/directives/class-map.js';
import { styles } from './nile-breadcrumb-item.css';
import NileElement from '../internal/nile-element';
/**
 * Nile BreadCrumb Item component.
 *
 * @tag nile-breadcrumb-item
 *
 */
let NileBreadcrumbItem = class NileBreadcrumbItem extends NileElement {
    constructor() {
        super(...arguments);
        this.isLast = false;
        /* #endregion */
        /* #region Methods */
        /**
         * Render method
         * @slot This is a slot test
         */
        this.separator = 'var(--nile-icon-arrow-right, var(--ng-icon-chevron-right))';
        /* #endregion */
    }
    /**
     * The styles for BreadcrumbItem
     * @remarks If you are extending this class you can extend the base styles with super. Eg `return [super(), myCustomStyles]`
     */
    static get styles() {
        return [styles];
    }
    handleClick() {
        if (this.isLast) {
            return;
        }
        this.emit('nile-click-item');
    }
    render() {
        return html `
    <div part="item"
        class=${classMap({
            'nile-breadcrumb-item__slot-text': !this.isLast,
            'nile-breadcrumb-item__last-slot-text': this.isLast,
        })}
        @click=${this.handleClick}
        >
        <slot></slot>
      </div>
      <nile-icon
        name=${this.separator}
        aria-label=${this.separator}
        method="var(--nile-svg-method-fill, var(--ng-svg-method-stroke))"
        color="var(--nile-colors-dark-500, var(--ng-colors-fg-quaternary-400))"
        class=${classMap({
            'nile-breadcrumb-item__arrow': true,
            'nile-breadcrumb-item__arrow-hidden': this.isLast,
        })}
        size="14"
      ></nile-icon>
    `;
    }
};
__decorate([
    state()
], NileBreadcrumbItem.prototype, "isLast", void 0);
__decorate([
    property({ type: String })
], NileBreadcrumbItem.prototype, "separator", void 0);
NileBreadcrumbItem = __decorate([
    customElement('nile-breadcrumb-item')
], NileBreadcrumbItem);
export { NileBreadcrumbItem };
export default NileBreadcrumbItem;
//# sourceMappingURL=nile-breadcrumb-item.js.map