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 { customElement } from 'lit/decorators.js';
import { styleMap } from 'lit/directives/style-map.js';
import { html } from 'lit/static-html.js';
import { Bound } from '../../../../../surface-block/index.js';
import { EdgelessPortalBase } from '../edgeless-portal-base.js';
let EdgelessBlockPortalEmbed = class EdgelessBlockPortalEmbed extends EdgelessPortalBase {
    render() {
        const { model, index } = this;
        const bound = Bound.deserialize(model.xywh);
        const style = {
            position: 'absolute',
            zIndex: `${index}`,
            width: `${bound.w}px`,
            height: `${bound.h}px`,
            left: `${bound.x}px`,
            top: `${bound.y}px`,
            transformOrigin: '0px 0px',
        };
        return html `
      <div class="edgeless-block-portal-embed" style=${styleMap(style)}>
        ${this.renderModel(model)}
      </div>
    `;
    }
};
EdgelessBlockPortalEmbed = __decorate([
    customElement('edgeless-block-portal-embed')
], EdgelessBlockPortalEmbed);
export { EdgelessBlockPortalEmbed };
//# sourceMappingURL=edgeless-embed.js.map