"use strict";
Object.defineProperty(exports, "__esModule", {
    value: true
});
function _export(target, all) {
    for(var name in all)Object.defineProperty(target, name, {
        enumerable: true,
        get: all[name]
    });
}
_export(exports, {
    CellBar: function() {
        return CellBar;
    },
    CellBarDirection: function() {
        return CellBarDirection;
    }
});
const _jsxruntime = require("react/jsx-runtime");
const _react = require("react");
const _css = require("../../utils/css");
var CellBarDirection;
(function(CellBarDirection) {
    CellBarDirection[CellBarDirection["LEFT_TO_RIGHT"] = 0] = "LEFT_TO_RIGHT";
    CellBarDirection[CellBarDirection["RIGHT_TO_LEFT"] = 1] = "RIGHT_TO_LEFT";
})(CellBarDirection || (CellBarDirection = {}));
const CellBar = (props)=>{
    const { direction = 1 } = props;
    const transform = (0, _react.useMemo)(()=>{
        const x = Math.max(props.width, 0);
        if (direction === 0) {
            return {
                transform: `translateX(${x}%)`
            };
        }
        return {
            transform: `translateX(-${x}%)`
        };
    }, [
        props.width
    ]);
    return /*#__PURE__*/ (0, _jsxruntime.jsx)("div", {
        className: (0, _css.cn)("orderly-absolute orderly-right-[-100%] orderly-top-0 orderly-h-full orderly-w-full orderly-transition-transform orderly-pointer-events-none", direction === 0 && "orderly-left-[-100%]", props.className),
        style: transform
    });
};

//# sourceMappingURL=cellBar.js.map