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 '../../panel/one-row-color-panel.js';
import '../../buttons/tool-icon-button.js';
import '../common/slide-menu.js';
import { WithDisposable } from '@blockeditor/lit';
import { css, html, LitElement, nothing } from 'lit';
import { customElement, property } from 'lit/decorators.js';
let EdgelessBrushMenu = class EdgelessBrushMenu extends WithDisposable(LitElement) {
    render() {
        if (this.edgeless.edgelessTool.type !== 'brush')
            return nothing;
        const { color, lineWidth } = this;
        return html `
      <edgeless-slide-menu>
        <div class="menu-content">
          <edgeless-line-width-panel
            .selectedSize=${lineWidth}
            @select=${(e) => this.onChange({ lineWidth: e.detail })}
          >
          </edgeless-line-width-panel>
          <menu-divider .vertical=${true}></menu-divider>
          <edgeless-one-row-color-panel
            .value=${color}
            @select=${(e) => this.onChange({ color: e.detail })}
          ></edgeless-one-row-color-panel>
        </div>
      </edgeless-slide-menu>
    `;
    }
};
EdgelessBrushMenu.styles = css `
    :host {
      display: flex;
      position: absolute;
      z-index: -1;
    }

    .menu-content {
      display: flex;
      align-items: center;
    }

    menu-divider {
      height: 24px;
      margin: 0 9px;
    }
  `;
__decorate([
    property({ attribute: false })
], EdgelessBrushMenu.prototype, "edgeless", void 0);
__decorate([
    property({ attribute: false })
], EdgelessBrushMenu.prototype, "color", void 0);
__decorate([
    property({ attribute: false })
], EdgelessBrushMenu.prototype, "lineWidth", void 0);
__decorate([
    property({ attribute: false })
], EdgelessBrushMenu.prototype, "onChange", void 0);
EdgelessBrushMenu = __decorate([
    customElement('edgeless-brush-menu')
], EdgelessBrushMenu);
export { EdgelessBrushMenu };
//# sourceMappingURL=brush-menu.js.map