"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
exports.__esModule = true;
exports.default = void 0;
var _react = _interopRequireDefault(require("react"));
var _InputConsumer = _interopRequireDefault(require("../InputConsumer"));
var _IconAffixSt = require("./IconAffix.st.css.js");
var _jsxFileName = "/home/builduser/work/57e038ea7326c1ec/packages/wix-design-system/dist/cjs/Input/components/IconAffix/IconAffix.tsx";
var IconAffix = _ref => {
  var {
    children,
    dataHook
  } = _ref;
  return /*#__PURE__*/_react.default.createElement(_InputConsumer.default, {
    consumerCompName: IconAffix.displayName,
    __self: void 0,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 12,
      columnNumber: 3
    }
  }, _ref2 => {
    var {
      size,
      inPrefix,
      inSuffix,
      border,
      disabled,
      onInputClicked
    } = _ref2;
    return /*#__PURE__*/_react.default.createElement("div", {
      className: (0, _IconAffixSt.st)(_IconAffixSt.classes.root, {
        size,
        inPrefix,
        inSuffix,
        border,
        disabled
      }),
      onClick: !disabled ? onInputClicked : undefined,
      "data-hook": dataHook,
      __self: void 0,
      __source: {
        fileName: _jsxFileName,
        lineNumber: 14,
        columnNumber: 7
      }
    }, /*#__PURE__*/_react.default.cloneElement(children, {
      size: size === 'tiny' || size === 'small' ? '18px' : '24px'
    }));
  });
};
IconAffix.displayName = 'Input.IconAffix';
var _default = exports.default = IconAffix;
//# sourceMappingURL=IconAffix.js.map