import React from 'react';
import { FormFieldSpinnerUp, FormFieldSpinnerDown, } from '@wix/wix-ui-icons-common/system';
import { st, classes } from './Ticker.st.css.js';
import InputConsumer from '../InputConsumer';
import { dataHooks } from './Ticker.constants';
const Ticker = ({ onUp, onDown, upDisabled, downDisabled, onMouseDown, dataHook, }) => (React.createElement(InputConsumer, { consumerCompName: Ticker.displayName }, ({ disabled, readOnly, size }) => {
    const isUpDisabled = upDisabled || disabled || readOnly;
    const isDownDisabled = downDisabled || disabled || readOnly;
    return (React.createElement("div", { className: st(classes.root, {
            size,
        }), onMouseDown: onMouseDown, "data-hook": dataHook },
        React.createElement("div", { "data-hook": dataHooks.tickerUp, "data-disabled": isUpDisabled, className: st(classes.up, { disabled: isUpDisabled }), onClick: isUpDisabled ? undefined : onUp },
            React.createElement(FormFieldSpinnerUp, null)),
        React.createElement("div", { "data-hook": dataHooks.tickerDown, "data-disabled": isDownDisabled, className: st(classes.down, { disabled: isDownDisabled }), onClick: isDownDisabled ? undefined : onDown },
            React.createElement(FormFieldSpinnerDown, null))));
}));
Ticker.displayName = 'Input.Ticker';
export default Ticker;
//# sourceMappingURL=Ticker.js.map