"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
exports.__esModule = true;
exports.DisabledTooltip = DisabledTooltip;
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
var _designSystem = require("@wix/design-system");
var _react = _interopRequireDefault(require("react"));
var _jsxFileName = "/home/builduser/work/843658b9f44192f0/packages/cairo/dist/cjs/components/DisabledTooltip/DisabledTooltip.tsx";
function DisabledTooltip(props) {
  const {
    children,
    width,
    ...rest
  } = props;
  const {
    props: {
      disabled
    }
  } = children;
  let child = children;
  if (disabled) {
    child = /*#__PURE__*/_react.default.createElement(_designSystem.Tooltip, (0, _extends2.default)({}, rest, {
      __self: this,
      __source: {
        fileName: _jsxFileName,
        lineNumber: 27,
        columnNumber: 7
      }
    }), /*#__PURE__*/_react.default.createElement(_designSystem.Box, {
      direction: "horizontal",
      width: width,
      __self: this,
      __source: {
        fileName: _jsxFileName,
        lineNumber: 28,
        columnNumber: 9
      }
    }, child));
  }
  return child;
}
//# sourceMappingURL=DisabledTooltip.js.map