import { useTree, usePrefix } from '../../hooks';
import { observer } from '@formily/reactive-vue';
import { IconWidget } from '../IconWidget';
import './styles.less';
import { defineComponent } from 'vue-demi';
import { isComment } from '../../utils/vnode';
var EmptyWidgetComponent = defineComponent({
    name: 'DnEmptyWidget',
    props: {
        dragTipsDirection: { type: String, default: 'left' },
    },
    setup: function (props, _a) {
        var slots = _a.slots;
        var treeRef = useTree();
        var prefixRef = usePrefix('empty');
        return function () {
            var _a, _b, _c;
            var renderEmpty = function () {
                return (<div style={{ display: 'flex', flexDirection: 'column' }}>
            <div class="animations">
              <IconWidget {...{
                    infer: props.dragTipsDirection === 'left'
                        ? 'DragLeftSourceAnimation'
                        : 'DragRightSourceAnimation',
                    size: 240,
                }}/>
              <IconWidget {...{ infer: 'BatchDragAnimation', size: 240 }}/>
            </div>
            <div class="hotkeys-list">
              <div>
                Selection <IconWidget infer="Command"/> + Click /{' '}
                <IconWidget infer="Shift"/> + Click /{' '}
                <IconWidget infer="Command"/> + A
              </div>
              <div>
                Copy <IconWidget infer="Command"/> + C / Paste{' '}
                <IconWidget infer="Command"/> + V
              </div>
              <div>
                Delete <IconWidget infer="Delete"/>
              </div>
            </div>
          </div>);
            };
            var emptyContent = (_a = slots.default) === null || _a === void 0 ? void 0 : _a.call(slots);
            if (!((_c = (_b = treeRef.value) === null || _b === void 0 ? void 0 : _b.children) === null || _c === void 0 ? void 0 : _c.length)) {
                return (<div class={prefixRef.value}>
            {!(emptyContent === null || emptyContent === void 0 ? void 0 : emptyContent.every(isComment)) ? emptyContent : renderEmpty()}
          </div>);
            }
            return null;
        };
    },
});
export var EmptyWidget = observer(EmptyWidgetComponent);
//# sourceMappingURL=index.jsx.map