"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.EmptyWidget = void 0;
var hooks_1 = require("../../hooks");
var reactive_vue_1 = require("@formily/reactive-vue");
var IconWidget_1 = require("../IconWidget");
require("./styles.less");
var vue_demi_1 = require("vue-demi");
var vnode_1 = require("../../utils/vnode");
var EmptyWidgetComponent = (0, vue_demi_1.defineComponent)({
    name: 'DnEmptyWidget',
    props: {
        dragTipsDirection: { type: String, default: 'left' },
    },
    setup: function (props, _a) {
        var slots = _a.slots;
        var treeRef = (0, hooks_1.useTree)();
        var prefixRef = (0, hooks_1.usePrefix)('empty');
        return function () {
            var _a, _b, _c;
            var renderEmpty = function () {
                return (<div style={{ display: 'flex', flexDirection: 'column' }}>
            <div class="animations">
              <IconWidget_1.IconWidget {...{
                    infer: props.dragTipsDirection === 'left'
                        ? 'DragLeftSourceAnimation'
                        : 'DragRightSourceAnimation',
                    size: 240,
                }}/>
              <IconWidget_1.IconWidget {...{ infer: 'BatchDragAnimation', size: 240 }}/>
            </div>
            <div class="hotkeys-list">
              <div>
                Selection <IconWidget_1.IconWidget infer="Command"/> + Click /{' '}
                <IconWidget_1.IconWidget infer="Shift"/> + Click /{' '}
                <IconWidget_1.IconWidget infer="Command"/> + A
              </div>
              <div>
                Copy <IconWidget_1.IconWidget infer="Command"/> + C / Paste{' '}
                <IconWidget_1.IconWidget infer="Command"/> + V
              </div>
              <div>
                Delete <IconWidget_1.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(vnode_1.isComment)) ? emptyContent : renderEmpty()}
          </div>);
            }
            return null;
        };
    },
});
exports.EmptyWidget = (0, reactive_vue_1.observer)(EmptyWidgetComponent);
//# sourceMappingURL=index.jsx.map