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;
};
import { LitElement, css, html, nothing } from 'lit';
import { customElement, property } from 'lit/decorators.js';
import { ifDefined } from 'lit/directives/if-defined.js';
import { Bubble } from '../bubble.js';
import './play-button.js';
let PlayDetails = class PlayDetails extends LitElement {
    constructor() {
        super(...arguments);
        this.appearance = 'secondary';
        this.size = 'medium';
        this.direction = 'down';
    }
    render() {
        return html `<play-button
        appearance=${this.appearance}
        ?disabled=${this.disabled}
        endIcon=${`caret-${this.direction}-outline`}
        icon=${ifDefined(this.icon)}
        size=${this.size}
        @click=${() => {
            this.open = !this.open;
            this.dispatchEvent(Bubble('open', this.open));
        }}
        ><slot name="summary"></slot></play-button
      >${this.open ? html `<slot></slot>` : nothing}`;
    }
};
PlayDetails.styles = css `
    slot:not([name])::slotted(*) {
      position: absolute;
      border-color: var(--rpl-neutral-border);
      border-radius: 16px;
      border-style: solid;
      background-color: var(--rpl-neutral-background);
      border-color: var(--rpl-neutral-border);
      border-width: 1px;
      padding: 16px;
      margin-top: 2px;
      white-space: nowrap;
    }
  `;
__decorate([
    property()
], PlayDetails.prototype, "appearance", void 0);
__decorate([
    property({ type: Boolean })
], PlayDetails.prototype, "disabled", void 0);
__decorate([
    property()
], PlayDetails.prototype, "icon", void 0);
__decorate([
    property()
], PlayDetails.prototype, "size", void 0);
__decorate([
    property()
], PlayDetails.prototype, "direction", void 0);
__decorate([
    property({ type: Boolean })
], PlayDetails.prototype, "open", void 0);
PlayDetails = __decorate([
    customElement('play-details')
], PlayDetails);
export { PlayDetails };
//# sourceMappingURL=play-details.js.map