"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Resizer = void 0;
/*---------------------------------------------------------------------------------------------
 * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
 * See LICENSE.md in the project root for license terms and full copyright notice.
 *--------------------------------------------------------------------------------------------*/
/** @packageDocumentation
 * @module ContentView
 */
const React = require("react");
const classnames_1 = require("classnames");
/**
 * @internal
 */
function Resizer(props) {
    const { className, onClick, onDoubleClick, onMouseDown, onTouchEnd, onTouchStart, split, style, } = props;
    const resizerClasses = React.useMemo(() => (0, classnames_1.default)(split, className), [split, className]);
    return (React.createElement("span", { role: "presentation", className: resizerClasses, style: style, onMouseDown: (event) => onMouseDown(event.nativeEvent), onTouchStart: (event) => {
            onTouchStart(event.nativeEvent);
        }, onTouchEnd: (event) => {
            event.preventDefault();
            onTouchEnd();
        }, onClick: (event) => {
            if (onClick) {
                event.preventDefault();
                onClick(event.nativeEvent);
            }
        }, onDoubleClick: (event) => {
            if (onDoubleClick) {
                event.preventDefault();
                onDoubleClick(event.nativeEvent);
            }
        } },
        React.createElement("div", { className: "nz-resizer-grip" })));
}
exports.Resizer = Resizer;
//# sourceMappingURL=Resizer.js.map