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 } from 'lit';
import { customElement } from 'lit/decorators.js';
import { createIcon } from '../../../../_common/components/icon/uni-icon.js';
import { BaseCellRenderer } from '../base-cell.js';
import { columnRenderer, createFromBaseCellRenderer } from '../renderer.js';
import { RichTextCell, RichTextCellEditing, } from '../rich-text/cell-renderer.js';
import { titleColumnTypeName, titlePureColumnConfig } from './define.js';
let TitleDetailCell = class TitleDetailCell extends BaseCellRenderer {
    connectedCallback() {
        super.connectedCallback();
        this._disposables.addFromEvent(this, 'keydown', e => {
            if (e.key === 'Enter' && !e.shiftKey && !e.isComposing) {
                e.stopPropagation();
                e.preventDefault();
                return;
            }
        }, true);
    }
    extra() {
        // eslint-disable-next-line @typescript-eslint/no-explicit-any
        return this.column.getExtra(this.rowId);
    }
    render() {
        return this.extra().result;
    }
};
TitleDetailCell.styles = css ``;
TitleDetailCell = __decorate([
    customElement('data-view-title-detail-cell')
], TitleDetailCell);
export { TitleDetailCell };
columnRenderer.register({
    type: titleColumnTypeName,
    icon: createIcon('TitleIcon'),
    cellRenderer: {
        view: createFromBaseCellRenderer(RichTextCell),
        edit: createFromBaseCellRenderer(RichTextCellEditing),
    },
});
export const titleColumnConfig = titlePureColumnConfig;
//# sourceMappingURL=cell-renderer.js.map