"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.Doc = void 0;
require("core-js/modules/web.timers.js");
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
var _react = require("react");
var _ = require(".");
var _jsxRuntime = require("react/jsx-runtime");
var meta = {
  title: 'Components/LatestButton',
  tags: ['autodocs'],
  component: _.LatestButton,
  args: {
    styles: {
      display: 'flex'
    }
  },
  argTypes: {}
};
var Doc = exports.Doc = function Doc(props) {
  var styles = props.styles;
  var _useState = (0, _react.useState)(true),
    _useState2 = (0, _slicedToArray2["default"])(_useState, 2),
    basicVisible = _useState2[0],
    setBasicVisible = _useState2[1];
  var handleChange = function handleChange(val) {
    if (!val) {
      setBasicVisible(false);
    }
  };
  (0, _react.useEffect)(function () {
    if (!basicVisible) {
      var timerId = setTimeout(function () {
        setBasicVisible(true);
        clearTimeout(timerId);
      }, 2 * 1000);
    }
  }, [basicVisible]);
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
    style: {
      display: 'flex',
      flexDirection: 'column',
      padding: 50,
      border: 'solid 0.5px #e5e7eb'
    },
    children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
      children: "Basic: \u9876\u90E8"
    }), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
      style: {
        width: 200,
        marginBottom: 50,
        minHeight: 100,
        display: 'flex',
        flexDirection: 'column',
        position: 'relative',
        border: '1px solid gray'
      },
      children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_.LatestButton, {
        txt: "32 New Message(s)",
        iconTransform: true,
        direction: "top"
      })
    }), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
      style: {
        height: 30
      },
      children: "Basic: \u5E95\u90E8"
    }), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
      style: {
        width: 200,
        minHeight: 100,
        marginBottom: 50,
        display: 'flex',
        flexDirection: 'column',
        border: '1px solid gray',
        position: 'relative'
      },
      children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_.LatestButton, {
        txt: "32 New Message(s)"
      })
    }), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
      style: {
        height: 30
      },
      children: "Basic: \u5E95\u90E8"
    }), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
      style: {
        width: 200,
        minHeight: 100,
        marginBottom: 50,
        display: 'flex',
        flexDirection: 'column',
        border: '1px solid gray',
        position: 'relative'
      },
      children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_.LatestButton, {
        txt: "\u56DE\u5230\u6700\u65B0\u4F4D\u7F6E"
      })
    })]
  });
};
var _default = exports["default"] = meta;