import "core-js/modules/es.array.map.js";
import "core-js/modules/es.object.to-string.js";
import { FcrToolTip } from '.';
import { FcrGuideToolTip } from './guide';
import { FcrInfoToolTip } from './info';
import { FcrDialogToolTip } from './dialog';
import React from 'react';
import { FcrButton } from '../button';
import { jsx as _jsx } from "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'
    }
  }
};
export var Basic = {
  render: function render(_ref) {
    var trigger = _ref.trigger;
    return /*#__PURE__*/_jsx(React.Fragment, {
      children: /*#__PURE__*/_jsx("div", {
        style: {
          display: 'grid',
          gridTemplateColumns: 'repeat(3, minmax(0, 1fr))',
          gap: 30,
          padding: 50
        },
        children: placementMap.map(function (placement) {
          return /*#__PURE__*/_jsx(FcrToolTip, {
            trigger: trigger,
            placement: placement,
            content: placement,
            children: /*#__PURE__*/_jsx(FcrButton, {
              children: placement
            })
          }, placement);
        })
      })
    });
  }
};
export var Guide = {
  render: function render(_ref2) {
    var trigger = _ref2.trigger;
    return /*#__PURE__*/_jsx(FcrGuideToolTip, {
      onClose: function onClose() {
        console.log('onClose');
      },
      trigger: trigger,
      placement: 'top',
      content: '解除禁言',
      closable: true,
      children: /*#__PURE__*/_jsx(FcrButton, {
        children: "guide"
      })
    });
  }
};
export var Info = {
  render: function render(_ref3) {
    var trigger = _ref3.trigger;
    return /*#__PURE__*/_jsx(FcrInfoToolTip, {
      trigger: trigger,
      placement: 'top',
      content: '🙋 有1人举手，请点击查看',
      children: /*#__PURE__*/_jsx(FcrButton, {
        children: "info"
      })
    });
  }
};
export var Dialog = {
  render: function render(_ref4) {
    var trigger = _ref4.trigger;
    return /*#__PURE__*/_jsx(FcrDialogToolTip, {
      trigger: trigger,
      placement: 'top',
      content: '🙋 有1人举手，请点击查看',
      onClose: function onClose() {
        console.log('onClose');
      },
      children: /*#__PURE__*/_jsx(FcrButton, {
        children: "dialog"
      })
    });
  }
};
export var LongText = {
  render: function render(_ref5) {
    var trigger = _ref5.trigger;
    return /*#__PURE__*/_jsx(FcrToolTip, {
      visible: true,
      mouseEnterDelay: 0,
      trigger: trigger,
      placement: 'top',
      content: 'zhing we掌握耐高时的恐惧啊速度很快就撒的环境卡上的哈快结束',
      children: /*#__PURE__*/_jsx(FcrButton, {
        children: "long text"
      })
    });
  }
};
export var Transparent = {
  render: function render(_ref6) {
    var trigger = _ref6.trigger;
    return /*#__PURE__*/_jsx(FcrToolTip, {
      visible: true,
      transparent: true,
      mouseEnterDelay: 0,
      trigger: trigger,
      placement: 'top',
      content: 'tipstips',
      children: /*#__PURE__*/_jsx(FcrButton, {
        children: "long text"
      })
    });
  }
};
export default meta;