/*---------------------------------------------------------------------------------------------
 * 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
 */
import * as React from "react";
import classnames from "classnames";
/**
 * @internal
 */
export function Resizer(props) {
    const { className, onClick, onDoubleClick, onMouseDown, onTouchEnd, onTouchStart, split, style, } = props;
    const resizerClasses = React.useMemo(() => classnames(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" })));
}
//# sourceMappingURL=Resizer.js.map