"use strict";

require("core-js/modules/es.object.define-property.js");
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports["default"] = exports.Transparent = exports.LongText = exports.Info = exports.Guide = exports.Dialog = exports.Basic = void 0;
require("core-js/modules/es.array.map.js");
require("core-js/modules/es.object.to-string.js");
var _ = require(".");
var _guide = require("./guide");
var _info = require("./info");
var _dialog = require("./dialog");
var _react = _interopRequireDefault(require("react"));
var _button = require("../button");
var _jsxRuntime = require("react/jsx-runtime");
var placementMap = ['left', 'top', 'bottom', 'right', 'leftTop', 'leftBottom', 'rightTop', 'rightBottom', 'topLeft', 'topRight', 'bottomLeft', 'bottomRight'];
var meta = {
  title: 'Components/ToolTip',
  argTypes: {
    trigger: {
      control: 'radio',
      options: ['hover', 'click'],
      defaultValue: 'hover'
    }
  }
};
var Basic = exports.Basic = {
  render: function render(_ref) {
    var trigger = _ref.trigger;
    return /*#__PURE__*/(0, _jsxRuntime.jsx)(_react["default"].Fragment, {
      children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
        style: {
          display: 'grid',
          gridTemplateColumns: 'repeat(3, minmax(0, 1fr))',
          gap: 30,
          padding: 50
        },
        children: placementMap.map(function (placement) {
          return /*#__PURE__*/(0, _jsxRuntime.jsx)(_.FcrToolTip, {
            trigger: trigger,
            placement: placement,
            content: placement,
            children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_button.FcrButton, {
              children: placement
            })
          }, placement);
        })
      })
    });
  }
};
var Guide = exports.Guide = {
  render: function render(_ref2) {
    var trigger = _ref2.trigger;
    return /*#__PURE__*/(0, _jsxRuntime.jsx)(_guide.FcrGuideToolTip, {
      onClose: function onClose() {
        console.log('onClose');
      },
      trigger: trigger,
      placement: 'top',
      content: '解除禁言',
      closable: true,
      children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_button.FcrButton, {
        children: "guide"
      })
    });
  }
};
var Info = exports.Info = {
  render: function render(_ref3) {
    var trigger = _ref3.trigger;
    return /*#__PURE__*/(0, _jsxRuntime.jsx)(_info.FcrInfoToolTip, {
      trigger: trigger,
      placement: 'top',
      content: '🙋 有1人举手，请点击查看',
      children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_button.FcrButton, {
        children: "info"
      })
    });
  }
};
var Dialog = exports.Dialog = {
  render: function render(_ref4) {
    var trigger = _ref4.trigger;
    return /*#__PURE__*/(0, _jsxRuntime.jsx)(_dialog.FcrDialogToolTip, {
      trigger: trigger,
      placement: 'top',
      content: '🙋 有1人举手，请点击查看',
      onClose: function onClose() {
        console.log('onClose');
      },
      children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_button.FcrButton, {
        children: "dialog"
      })
    });
  }
};
var LongText = exports.LongText = {
  render: function render(_ref5) {
    var trigger = _ref5.trigger;
    return /*#__PURE__*/(0, _jsxRuntime.jsx)(_.FcrToolTip, {
      visible: true,
      mouseEnterDelay: 0,
      trigger: trigger,
      placement: 'top',
      content: 'zhing we掌握耐高时的恐惧啊速度很快就撒的环境卡上的哈快结束',
      children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_button.FcrButton, {
        children: "long text"
      })
    });
  }
};
var Transparent = exports.Transparent = {
  render: function render(_ref6) {
    var trigger = _ref6.trigger;
    return /*#__PURE__*/(0, _jsxRuntime.jsx)(_.FcrToolTip, {
      visible: true,
      transparent: true,
      mouseEnterDelay: 0,
      trigger: trigger,
      placement: 'top',
      content: 'tipstips',
      children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_button.FcrButton, {
        children: "long text"
      })
    });
  }
};
var _default = exports["default"] = meta;