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 { css, html, LitElement } from 'lit';
import { customElement, property } from 'lit/decorators.js';
import { styleMap } from 'lit/directives/style-map.js';
let DragIndicator = class DragIndicator extends LitElement {
    constructor() {
        super(...arguments);
        this.rect = null;
    }
    render() {
        if (!this.rect) {
            return null;
        }
        const { left, top, width, height } = this.rect;
        const style = styleMap({
            width: `${width}px`,
            height: `${height}px`,
            transform: `translate(${left}px, ${top}px)`,
        });
        return html `<div
      class="affine-drag-indicator blockeditor-overlay"
      style=${style}
    ></div>`;
    }
};
DragIndicator.styles = css `
    .affine-drag-indicator {
      position: absolute;
      top: 0;
      left: 0;
      background: var(--affine-primary-color);
      transition-property: width, height, transform;
      transition-duration: 100ms;
      transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
      transition-delay: 0s;
      transform-origin: 0 0;
      pointer-events: none;
      z-index: 2;
    }
  `;
__decorate([
    property({ attribute: false })
], DragIndicator.prototype, "rect", void 0);
DragIndicator = __decorate([
    customElement('affine-drag-indicator')
], DragIndicator);
export { DragIndicator };
//# sourceMappingURL=drag-indicator.js.map