/**
 * amis-ui v6.12.0-beta.0
 * Copyright 2018-2025 fex
 */

'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

var tslib = require('tslib');
var React = require('react');

function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }

var React__default = /*#__PURE__*/_interopDefaultLegacy(React);

var __react_jsx__ = require('react');
var _J$X_ = (__react_jsx__["default"] || __react_jsx__).createElement;
(__react_jsx__["default"] || __react_jsx__).Fragment;
var ItemActionsWrapper = /** @class */ (function (_super) {
    tslib.__extends(ItemActionsWrapper, _super);
    function ItemActionsWrapper() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    ItemActionsWrapper.prototype.render = function () {
        var _a, _b;
        var _c = this.props, cx = _c.classnames, children = _c.children, dom = _c.dom;
        if (!dom) {
            return;
        }
        var frame = (_b = (_a = dom.closest('table')) === null || _a === void 0 ? void 0 : _a.parentElement) === null || _b === void 0 ? void 0 : _b.parentElement;
        var rect = dom.getBoundingClientRect();
        var height = rect.height;
        var top = rect.top - frame.getBoundingClientRect().top;
        return (_J$X_("div", { className: cx('Table-itemActions-wrap'), style: { top: top + 'px', height: height + 'px' } }, children));
    };
    return ItemActionsWrapper;
}(React__default["default"].PureComponent));

exports["default"] = ItemActionsWrapper;
