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 '@kano/styles/typography.js';
import { customElement, html } from 'lit-element/lit-element.js';
import { EventEmitter, subscribeDOM } from '@kano/common/index.js';
import { FloatingMenu, KCFloatingMenu } from '../../../../widget/floating-menu.js';
let KCBriefingFloatingMenu = class KCBriefingFloatingMenu extends KCFloatingMenu {
    renderActions() {
        return html `
            <button class="btn secondary" @click=${() => this._onResetClick()}>Reset</button>
            <button class="btn secondary" @click=${() => this._onDoneClick()}>I'm done</button>
        `;
    }
    _onResetClick() {
        this.dispatchEvent(new CustomEvent('reset-clicked'));
    }
    _onDoneClick() {
        this.dispatchEvent(new CustomEvent('done-clicked'));
    }
};
KCBriefingFloatingMenu = __decorate([
    customElement('kc-briefing-floating-menu')
], KCBriefingFloatingMenu);
export { KCBriefingFloatingMenu };
export class BriefingFloatingMenu extends FloatingMenu {
    constructor(title) {
        super('Briefing', title);
        this.subscriptions = [];
        this._onDidRequestReset = new EventEmitter();
        this._onDidEnd = new EventEmitter();
    }
    get onDidRequestReset() { return this._onDidRequestReset.event; }
    get onDidEnd() { return this._onDidEnd.event; }
    getMenuNode() {
        if (!this.menuNode) {
            this.menuNode = new KCBriefingFloatingMenu();
            this.menuNode.title = this.title;
            this.menuNode.header = this.header;
            subscribeDOM(this.menuNode, 'reset-clicked', () => this._onDidRequestReset.fire(), this, this.subscriptions);
            subscribeDOM(this.menuNode, 'done-clicked', () => this._onDidEnd.fire(), this, this.subscriptions);
        }
        return this.menuNode;
    }
    dispose() {
        this.subscriptions.forEach(d => d.dispose());
        this.subscriptions.length = 0;
    }
}
//# sourceMappingURL=floating-menu.js.map