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;
};
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
    if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
    if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
    return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
};
var _PlayPenFooter_instances, _PlayPenFooter_isDark;
import { consume } from '@lit-labs/context';
import { LitElement, css, html } from 'lit';
import { customElement, property } from 'lit/decorators.js';
import { Bubble } from '../bubble.js';
import { penCtx } from './play-pen-context.js';
import './play-button.js';
let PlayPenFooter = class PlayPenFooter extends LitElement {
    constructor() {
        super(...arguments);
        _PlayPenFooter_instances.add(this);
    }
    render() {
        return html `<footer>
      <play-button
        appearance="brand"
        label="Console"
        endIcon="caret-up-outline"
        title="Toggle Console"
        @click=${() => console.log('Toggle the console')}
      ></play-button>
      <div class="actions">
        <play-button
          appearance="brand"
          label="Mobile"
          endIcon="caret-down-outline"
          title="Toggle Device Options"
          @click=${() => console.log('Show devices/sizes menu')}
        ></play-button>
        <play-button
          appearance="brand"
          icon="night-outline"
          title="Toggle Scheme"
          @click=${() => this.dispatchEvent(Bubble('play-pen-set-scheme', __classPrivateFieldGet(this, _PlayPenFooter_instances, "m", _PlayPenFooter_isDark).call(this) ? 'light' : 'dark'))}
        ></play-button>
        <play-button
          appearance="brand"
          icon="overflow-horizontal-outline"
          title="Additional Options"
          @click=${() => console.log('Show overflow menu')}
        ></play-button>
      </div>
    </footer>`;
    }
};
_PlayPenFooter_instances = new WeakSet();
_PlayPenFooter_isDark = function _PlayPenFooter_isDark() {
    return (globalThis.matchMedia('(prefers-color-scheme: dark)').matches ||
        this.scheme === 'dark');
};
PlayPenFooter.styles = css `
    footer {
      display: flex;
      flex-direction: row;
      gap: 16px;
      justify-content: space-between;
      background-color: var(--rpl-brand-background);
      padding-top: 2px;
      padding-right: 0px;
      padding-bottom: 2px;
      padding-left: 0px;
    }
    .actions {
      display: flex;
      flex-direction: row;
      gap: 8px;
    }
  `;
__decorate([
    consume({ context: penCtx.scheme, subscribe: true }),
    property({ attribute: false })
], PlayPenFooter.prototype, "scheme", void 0);
PlayPenFooter = __decorate([
    customElement('play-pen-footer')
], PlayPenFooter);
export { PlayPenFooter };
