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;
};
/// <reference types="vite/client" />
import { BlockElement } from '@blockeditor/lit';
import { css, html } from 'lit';
import { customElement } from 'lit/decorators.js';
import { BLOCK_CHILDREN_CONTAINER_PADDING_LEFT } from '../_common/consts.js';
let DividerBlockComponent = class DividerBlockComponent extends BlockElement {
    connectedCallback() {
        super.connectedCallback();
        this.handleEvent('click', () => {
            this.host.selection.set([
                this.host.selection.create('block', {
                    path: this.path,
                }),
            ]);
        });
    }
    render() {
        const children = html `<div
      class="affine-block-children-container"
      style="padding-left: ${BLOCK_CHILDREN_CONTAINER_PADDING_LEFT}px"
    >
      ${this.renderModelChildren(this.model)}
    </div>`;
        return html `
      <div class="affine-divider-block-container">
        <hr />
        ${children}
        ${this.selected?.is('block')
            ? html `<affine-block-selection></affine-block-selection>`
            : null}
      </div>
    `;
    }
};
DividerBlockComponent.styles = css `
    .affine-divider-block-container {
      position: relative;
      width: 100%;
      height: 1px;
      display: flex;
      flex-direction: column;
      justify-content: center;
      padding: 18px 8px;
      margin-top: var(--affine-paragraph-space);
    }
    hr {
      border: none;
      border-top: 1px solid var(--affine-divider-color);
      width: 100%;
    }
  `;
DividerBlockComponent = __decorate([
    customElement('affine-divider')
], DividerBlockComponent);
export { DividerBlockComponent };
//# sourceMappingURL=divider-block.js.map