import { observer } from "mobx-react"; import { ViewBoxBaseComponent } from "../../DocComponent"; import { FieldView, FieldViewProps } from "../FieldView"; import { computed } from "mobx"; import { Id } from "../../../../fields/FieldSymbols"; import React from "react"; import { EditableView } from "../../EditableView"; import { DocListCast } from "../../../../fields/Doc"; import { StrCast } from "../../../../fields/Types"; @observer export class ImportElementBox extends ViewBoxBaseComponent() { public static LayoutString(fieldKey: string) { return FieldView.LayoutString(ImportElementBox, fieldKey); } private _itemRef: React.RefObject = React.createRef(); private _dragRef: React.RefObject = React.createRef(); private _titleRef: React.RefObject = React.createRef(); @computed importBoxVoew() { return this.props.DocumentView?.()?.props.docViewPath().lastElement()?.ComponentView as PresBox; } @computed get indexInPres() { return DocListCast(this.presBox?.[StrCast(this.presBox.presFieldKey, 'data')]).indexOf(this.rootDoc); } @computed get presBox() { return this.props.DocumentView?.().props.docViewPath().lastElement()?.rootDoc; } // @computed get selectedArray() { // return this.presBoxView?.selectedArray; // } @computed get mainItem() { const isCurrent: boolean = this.presBox?._itemIndex === this.indexInPres; //const isSelected: boolean = this.selectedArray?.has(this.rootDoc) ? true : false; // const activeItem: Doc = this.rootDoc; return(
{/* StrCast(activeItem.title)} SetValue={this.onSetValue} /> */}
) } }