"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
exports.__esModule = true;
exports.default = void 0;
var _react = _interopRequireDefault(require("react"));
var _system = require("@wix/wix-ui-icons-common/system");
var _TickerSt = require("./Ticker.st.css.js");
var _InputConsumer = _interopRequireDefault(require("../InputConsumer"));
var _Ticker = require("./Ticker.constants");
var _jsxFileName = "/home/builduser/work/57e038ea7326c1ec/packages/wix-design-system/dist/cjs/Input/components/Ticker/Ticker.tsx";
var Ticker = _ref => {
  var {
    onUp,
    onDown,
    upDisabled,
    downDisabled,
    onMouseDown,
    dataHook
  } = _ref;
  return /*#__PURE__*/_react.default.createElement(_InputConsumer.default, {
    consumerCompName: Ticker.displayName,
    __self: void 0,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 28,
      columnNumber: 3
    }
  }, _ref2 => {
    var {
      disabled,
      readOnly,
      size
    } = _ref2;
    var isUpDisabled = upDisabled || disabled || readOnly;
    var isDownDisabled = downDisabled || disabled || readOnly;
    return /*#__PURE__*/_react.default.createElement("div", {
      className: (0, _TickerSt.st)(_TickerSt.classes.root, {
        size
      }),
      onMouseDown: onMouseDown,
      "data-hook": dataHook,
      __self: void 0,
      __source: {
        fileName: _jsxFileName,
        lineNumber: 33,
        columnNumber: 9
      }
    }, /*#__PURE__*/_react.default.createElement("div", {
      "data-hook": _Ticker.dataHooks.tickerUp,
      "data-disabled": isUpDisabled,
      className: (0, _TickerSt.st)(_TickerSt.classes.up, {
        disabled: isUpDisabled
      }),
      onClick: isUpDisabled ? undefined : onUp,
      __self: void 0,
      __source: {
        fileName: _jsxFileName,
        lineNumber: 40,
        columnNumber: 11
      }
    }, /*#__PURE__*/_react.default.createElement(_system.FormFieldSpinnerUp, {
      __self: void 0,
      __source: {
        fileName: _jsxFileName,
        lineNumber: 46,
        columnNumber: 13
      }
    })), /*#__PURE__*/_react.default.createElement("div", {
      "data-hook": _Ticker.dataHooks.tickerDown,
      "data-disabled": isDownDisabled,
      className: (0, _TickerSt.st)(_TickerSt.classes.down, {
        disabled: isDownDisabled
      }),
      onClick: isDownDisabled ? undefined : onDown,
      __self: void 0,
      __source: {
        fileName: _jsxFileName,
        lineNumber: 48,
        columnNumber: 11
      }
    }, /*#__PURE__*/_react.default.createElement(_system.FormFieldSpinnerDown, {
      __self: void 0,
      __source: {
        fileName: _jsxFileName,
        lineNumber: 54,
        columnNumber: 13
      }
    })));
  });
};
Ticker.displayName = 'Input.Ticker';
var _default = exports.default = Ticker;
//# sourceMappingURL=Ticker.js.map