/**
 * 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-card.css';
import { classMap } from 'lit/directives/class-map.js';
import { HasSlotController } from '../internal/slot';
import NileElements from '../internal/nile-element';
/**
 * Nile icon component.
 *
 * @tag nile-card
 *
 */
let NileCard = class NileCard extends NileElements {
    constructor() {
        super(...arguments);
        this.hasSlotController = new HasSlotController(this, 'footer');
        this.active = false;
        this.disabled = false;
    }
    render() {
        return html `
      <div
        part="base"
        class=${classMap({
            card: true,
            'card--has-footer': this.hasSlotController.test('footer'),
            'card--active': this.active,
            'card--disabled': this.disabled,
        })}
      >
        <div class="body__wrapper" part="body__wrapper"
        class=${classMap({
            'body__wrapper': true,
            'body__wrapper_nf': !this.hasSlotController.test('footer')
        })}
        >
          <slot name="header" part="header" class="card__header"></slot>
          <slot part="body" class="card__body"></slot>
        </div>

        <slot
          name="footer"
          part="footer"
          ?hidden="${!this.hasSlotController.test('footer')}"
          class="card__footer"
        ></slot>
      </div>
    `;
    }
};
NileCard.styles = styles;
__decorate([
    property({ type: Boolean, reflect: true })
], NileCard.prototype, "active", void 0);
__decorate([
    property({ type: Boolean, reflect: true })
], NileCard.prototype, "disabled", void 0);
NileCard = __decorate([
    customElement('nile-card')
], NileCard);
export { NileCard };
export default NileCard;
//# sourceMappingURL=nile-card.js.map