import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
import { useContext, useMemo } from "react";
import { TableContext } from "./tableContext";
export const FixedDivide = ()=>{
    const { getLeftFixedColumnsPosition, getRightFixedColumnsPosition, columns } = useContext(TableContext);
    const left = useMemo(()=>getLeftFixedColumnsPosition(), [
        columns
    ]);
    const right = 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__*/ _jsxs(_Fragment, {
        children: [
            left > 0 ? /*#__PURE__*/ _jsx("div", {
                id: "table_left_fixed_divide",
                className: `${classNames} peer-data-[left=fixed]:orderly-block`,
                style: {
                    left: `${left}px`
                }
            }) : null,
            right > 0 ? /*#__PURE__*/ _jsx("div", {
                id: "table_right_fixed_divide",
                className: `${classNames} peer-data-[right=fixed]:orderly-block`,
                style: {
                    right: `${right}px`
                }
            }) : null
        ]
    });
};

//# sourceMappingURL=fixedDivide.js.map