import "core-js/modules/es.symbol.js";
import "core-js/modules/es.array.filter.js";
import "core-js/modules/es.array.for-each.js";
import "core-js/modules/es.array.push.js";
import "core-js/modules/es.object.define-properties.js";
import "core-js/modules/es.object.define-property.js";
import "core-js/modules/es.object.get-own-property-descriptor.js";
import "core-js/modules/es.object.get-own-property-descriptors.js";
import "core-js/modules/es.object.keys.js";
import "core-js/modules/es.object.to-string.js";
import "core-js/modules/esnext.iterator.constructor.js";
import "core-js/modules/esnext.iterator.filter.js";
import "core-js/modules/esnext.iterator.for-each.js";
import "core-js/modules/web.dom-collections.for-each.js";
import _defineProperty from "@babel/runtime/helpers/defineProperty";
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
var _excluded = ["closable", "content", "onClose"];
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
import 'rc-tooltip/assets/bootstrap_white.css';
import './index.css';
import './arrow.css';
import classNames from 'classnames';
import { FcrToolTip } from '.';
import { FcrIcon } from '../icon';
import { FcrIconType } from '../icon/type';
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
var GuideToolTipClosableOverlayWrap = function GuideToolTipClosableOverlayWrap(props) {
  var content = props.content,
    closable = props.closable,
    onClose = props.onClose;
  return /*#__PURE__*/_jsxs("div", {
    className: classNames('fcr-guide-tooltip-overlay-content'),
    children: [/*#__PURE__*/_jsx("div", {
      style: {
        padding: closable ? '0px 8px' : '0px 24px'
      },
      className: classNames('fcr-guide-tooltip-overlay-content-inner'),
      children: content
    }), closable && /*#__PURE__*/_jsx("div", {
      className: classNames('fcr-guide-tooltip-overlay-content-closable', 'fcr-divider'),
      onClick: onClose,
      children: /*#__PURE__*/_jsx(FcrIcon, {
        type: FcrIconType.FCR_CLOSE,
        size: 24
      })
    })]
  });
};
export var FcrGuideToolTip = function FcrGuideToolTip(props) {
  var closable = props.closable,
    content = props.content,
    onClose = props.onClose,
    others = _objectWithoutProperties(props, _excluded);
  var defaultGuideOverlayInnerStyle = {
    padding: '0',
    background: "var(--fcr_ui_scene_inverse2)",
    border: "1px solid var(--fcr_ui_scene_inverse2)",
    fontStyle: 'normal',
    fontWeight: '400',
    fontSize: '14px',
    lineHeight: '40px',
    color: "var(--fcr_ui_scene_inverse)",
    borderRadius: "var(--fcr_cornerradius_xxs)"
  };
  return /*#__PURE__*/_jsx(FcrToolTip, _objectSpread({
    arrowContent: /*#__PURE__*/_jsx(FcrIcon, {
      colors: {
        iconPrimary: 'var(--fcr_ui_scene_inverse2)'
      },
      type: FcrIconType.FCR_TOOLTIP_ARROW,
      size: 16
    }),
    content: /*#__PURE__*/_jsx(GuideToolTipClosableOverlayWrap, {
      content: content,
      onClose: onClose,
      closable: closable
    }),
    overlayInnerStyle: _objectSpread(_objectSpread({}, defaultGuideOverlayInnerStyle), props.overlayInnerStyle)
  }, others));
};