/**
 * 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, property } from 'lit/decorators.js';
import { styles } from './nile-title.css';
import NileElement from '../internal/nile-element';
/**
 * Nile title component.
 *
 * @tag nile-title
 *
 */
let NileTitle = class NileTitle extends NileElement {
    constructor() {
        super(...arguments);
        this.headerText = '';
        this.pageTitle = '';
        /* #endregion */
    }
    /**
     * The styles for nile-title
     * @remarks If you are extending this class you can extend the base styles with super. Eg `return [super(), myCustomStyles]`
     */
    static get styles() {
        return [styles];
    }
    /* #endregion */
    /* #region Methods */
    /**
     * Called when the component is updated
     */
    updated(_changedProperties) {
        super.updated(_changedProperties);
        this.updateDocumentTitle();
    }
    /**
     * Updates the document title based on pageTitle or headerText
     */
    updateDocumentTitle() {
        document.title = this.pageTitle || this.headerText;
    }
    /**
     * Render method
     * @slot This is a slot test
     */
    render() {
        return html ` ${this.headerText ? html ` ${this.headerText} ` : ''} `;
    }
};
__decorate([
    property({ type: String })
], NileTitle.prototype, "headerText", void 0);
__decorate([
    property({ type: String })
], NileTitle.prototype, "pageTitle", void 0);
NileTitle = __decorate([
    customElement('nile-title')
], NileTitle);
export { NileTitle };
export default NileTitle;
//# sourceMappingURL=nile-title.js.map