"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.SelectDateTarget = void 0;
var _react = _interopRequireWildcard(require("react"));
var _classnames = _interopRequireDefault(require("classnames"));
var _Styles = require("./Styles");
var _IconButton = require("../IconButton");
var _Tooltip = require("../Tooltip");
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
var SelectDateTarget = exports.SelectDateTarget = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
  var IconComponent = _ref.icon,
    _ref$title = _ref.title,
    title = _ref$title === void 0 ? "" : _ref$title,
    onClick = _ref.onClick,
    _ref$forceHideTooltip = _ref.forceHideTooltip,
    forceHideTooltip = _ref$forceHideTooltip === void 0 ? false : _ref$forceHideTooltip,
    targetIconClassName = _ref.targetIconClassName,
    popperTooltipStyle = _ref.popperTooltipStyle,
    popperTooltipClassName = _ref.popperTooltipClassName,
    _ref$active = _ref.active,
    active = _ref$active === void 0 ? false : _ref$active;
  return /*#__PURE__*/_react.default.createElement(_Tooltip.Tooltip, {
    title: title,
    popperTooltipStyle: popperTooltipStyle,
    popperTooltipClassName: popperTooltipClassName,
    disable: forceHideTooltip || title === ""
  }, /*#__PURE__*/_react.default.createElement(_IconButton.IconButton, {
    variant: "text gray",
    size: "small",
    active: active,
    ref: ref,
    onClick: onClick,
    type: "button"
  }, /*#__PURE__*/_react.default.createElement(_Styles.StyledIconComponent, {
    as: IconComponent,
    className: (0, _classnames.default)("date-picker-target", targetIconClassName)
  })));
});
SelectDateTarget.displayName = "SelectDateTarget";
//# sourceMappingURL=SelectDateTarget.js.map