"use strict";
Object.defineProperty(exports, "__esModule", {
    value: true
});
Object.defineProperty(exports, "FixedDivide", {
    enumerable: true,
    get: function() {
        return FixedDivide;
    }
});
const _jsxruntime = require("react/jsx-runtime");
const _react = require("react");
const _tableContext = require("./tableContext");
const FixedDivide = ()=>{
    const { getLeftFixedColumnsPosition, getRightFixedColumnsPosition, columns } = (0, _react.useContext)(_tableContext.TableContext);
    const left = (0, _react.useMemo)(()=>getLeftFixedColumnsPosition(), [
        columns
    ]);
    const right = (0, _react.useMemo)(()=>getRightFixedColumnsPosition(), [
        columns
    ]);
    const classNames = "orderly-absolute orderly-top-0 orderly-bottom-0 orderly-w-[1px] orderly-bg-divider orderly-z-30 orderly-pointer-events-none orderly-hidden";
    return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_jsxruntime.Fragment, {
        children: [
            left > 0 ? /*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
                id: "table_left_fixed_divide",
                className: `${classNames} peer-data-[left=fixed]:orderly-block`,
                style: {
                    left: `${left}px`
                }
            }) : null,
            right > 0 ? /*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
                id: "table_right_fixed_divide",
                className: `${classNames} peer-data-[right=fixed]:orderly-block`,
                style: {
                    right: `${right}px`
                }
            }) : null
        ]
    });
};

//# sourceMappingURL=fixedDivide.js.map