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 __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
    if (kind === "m") throw new TypeError("Private method is not writable");
    if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
    if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
    return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
};
var _PlayToast_timeout;
import { LitElement, css, html } from 'lit';
import { customElement, property } from 'lit/decorators.js';
/** @slot - Toast content. */
let PlayToast = class PlayToast extends LitElement {
    constructor() {
        super(...arguments);
        this.opened = false;
        _PlayToast_timeout.set(this, void 0);
    }
    open() {
        if (__classPrivateFieldGet(this, _PlayToast_timeout, "f") != null)
            globalThis.clearTimeout(__classPrivateFieldGet(this, _PlayToast_timeout, "f"));
        this.opened = true;
        __classPrivateFieldSet(this, _PlayToast_timeout, globalThis.setTimeout(() => {
            this.opened = false;
            __classPrivateFieldSet(this, _PlayToast_timeout, undefined, "f");
        }, 3000), "f");
    }
    render() {
        return html `<slot></slot>`;
    }
};
_PlayToast_timeout = new WeakMap();
PlayToast.styles = css `
    :host {
      visibility: hidden;
      opacity: 0;
      position: fixed;
      bottom: var(--space);
      left: 50%;
      transform: translateX(-50%);
      transition-property: opacity;
      transition-duration: 0.1s;
      transition-timing-function: ease-in-out;
      background-color: var(--color-interactive-background);
      padding-left: var(--space);
      padding-right: var(--space);
      padding-bottom: var(--space);
      padding-top: var(--space);
      border-radius: var(--radius);
      z-index: var(--z-toast);
      border-width: var(--border-width);
      border-style: solid;
      border-color: var(--color-secondary-border);
    }

    :host([opened]) {
      visibility: visible;
      opacity: 1;
    }
  `;
__decorate([
    property({ reflect: true, type: Boolean })
], PlayToast.prototype, "opened", void 0);
PlayToast = __decorate([
    customElement('play-toast')
], PlayToast);
export { PlayToast };
//# sourceMappingURL=play-toast.js.map