import React from 'react';
import { isIE } from 'react-device-detect';
import { ScrollbarWrap } from './styled';
export const ScrollbarWrapper = React.forwardRef(({ children, height = 'auto', // если мы передаем цифру, то для ios добавляем высоту скрола, иначе
// выводим строку
viewStyle = {
    position: 'absolute',
    right: isIE ? '-17px' : 0,
    top: 0,
    left: 0,
    bottom: 0,
    //marginRight: '-25px',
    marginBottom: '-17px',
    overflow: 'scroll',
}, horizontalStyle = {
    position: 'absolute',
    height: '6px',
    bottom: 0,
    left: 0,
    borderRadius: '3px',
    width: '100%',
}, verticalStyle = {
    position: 'absolute',
    width: '6px',
    top: 0,
    right: 0,
    borderRadius: '3px',
    height: '100%',
}, options = {}, style = {}, extendsViewStyle = {}, extendsHorizontalStyle = {}, extendsVerticalStyle = {}, }, ref) => {
    const optionsData = Object.assign(Object.assign({}, options), { hideTracksWhenNotNeeded: true });
    // if (isMacOs) {
    //   return (
    //     <ScrollbarIosWrap ref={ref} height={height} style={style}>
    //       {children}
    //     </ScrollbarIosWrap>
    //   );
    // }
    return (React.createElement(ScrollbarWrap, Object.assign({ ref: ref }, optionsData, { renderView: (Style, ...props) => (React.createElement("div", Object.assign({}, props, { style: Object.assign(Object.assign(Object.assign({}, Style), viewStyle), extendsViewStyle), className: "view" }))), renderTrackHorizontal: (Style, ...props) => (React.createElement("div", Object.assign({}, props, { style: Object.assign(Object.assign(Object.assign({}, Style), horizontalStyle), extendsHorizontalStyle), className: "track-horizontal" }))), renderTrackVertical: (Style, ...props) => (React.createElement("div", Object.assign({}, props, { style: Object.assign(Object.assign(Object.assign({}, Style), verticalStyle), extendsVerticalStyle), className: "track-vertical" }))), className: "assessment-scrollbar", style: Object.assign(Object.assign({}, style), { height }) }), children));
});
