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 { WithDisposable } from '@blockeditor/lit';
import { css, html, LitElement, nothing } from 'lit';
import { customElement, property } from 'lit/decorators.js';
import { styleMap } from 'lit/directives/style-map.js';
let EdgelessDraggingAreaRect = class EdgelessDraggingAreaRect extends WithDisposable(LitElement) {
    firstUpdated() {
        this._disposables.add(this.edgeless.slots.draggingAreaUpdated.on(() => this.requestUpdate()));
    }
    render() {
        const rect = this.edgeless.tools.draggingArea;
        if (rect === null)
            return nothing;
        const style = {
            left: rect.left + 'px',
            top: rect.top + 'px',
            width: rect.width + 'px',
            height: rect.height + 'px',
        };
        return html `
      <div class="affine-edgeless-dragging-area" style=${styleMap(style)}></div>
    `;
    }
};
EdgelessDraggingAreaRect.styles = css `
    .affine-edgeless-dragging-area {
      position: absolute;
      background: var(--affine-hover-color);
      z-index: 1;
      pointer-events: none;
    }
  `;
__decorate([
    property({ attribute: false })
], EdgelessDraggingAreaRect.prototype, "edgeless", void 0);
EdgelessDraggingAreaRect = __decorate([
    customElement('edgeless-dragging-area-rect')
], EdgelessDraggingAreaRect);
export { EdgelessDraggingAreaRect };
//# sourceMappingURL=edgeless-dragging-area-rect.js.map