import { __assign, __rest } from "tslib";
import React, { useContext } from 'react';
import classNames from 'classnames';
import { ConfigContext } from '../config-provider/config-context';
import { getPrefixCls } from '../_utils/general';
var Resizer = function (props) {
    var _a;
    var size = props.size, onMouseDown = props.onMouseDown, customisedCls = props.prefixCls, mode = props.mode, className = props.className, otherProps = __rest(props, ["size", "onMouseDown", "prefixCls", "mode", "className"]);
    var configContext = useContext(ConfigContext);
    var prefixCls = getPrefixCls('split-bar', configContext.prefixCls, customisedCls);
    var cls = classNames(prefixCls, className, (_a = {},
        _a[prefixCls + "_" + mode] = mode,
        _a));
    var style = mode === 'vertical' ? { width: size } : { height: size };
    return (React.createElement("div", __assign({}, otherProps, { role: "presentation", className: cls, style: style, onMouseDown: function (e) { return onMouseDown(e); } }),
        React.createElement("div", { className: prefixCls + "__icon" })));
};
Resizer.displayName = 'Resizer';
export default Resizer;
//# sourceMappingURL=resizer.js.map