import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
import "core-js/modules/web.timers.js";
import { useEffect, useState } from 'react';
import { TextBubble } from '.';
import { FcrIconType } from '../icon/type';
import { IconText } from '../icon-text';
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
var meta = {
  title: 'Components/TextBubble',
  tags: ['autodocs'],
  component: TextBubble,
  args: {
    styles: {
      display: 'flex'
    }
  },
  argTypes: {}
};
export var Doc = function Doc(props) {
  var styles = props.styles;
  var _useState = useState(true),
    _useState2 = _slicedToArray(_useState, 2),
    basicVisible = _useState2[0],
    setBasicVisible = _useState2[1];
  var handleChange = function handleChange(val) {
    if (!val) {
      setBasicVisible(false);
    }
  };
  useEffect(function () {
    if (!basicVisible) {
      var timerId = setTimeout(function () {
        setBasicVisible(true);
        clearTimeout(timerId);
      }, 2 * 1000);
    }
  }, [basicVisible]);
  return /*#__PURE__*/_jsxs("div", {
    style: {
      display: 'flex',
      flexDirection: 'column',
      padding: 50,
      border: 'solid 0.5px #e5e7eb'
    },
    children: [/*#__PURE__*/_jsxs("div", {
      style: {
        width: 200,
        marginBottom: 50,
        display: 'flex',
        flexDirection: 'column'
      },
      children: [/*#__PURE__*/_jsx("span", {
        style: {
          marginBottom: 10
        },
        children: "Basic: none bg"
      }), /*#__PURE__*/_jsx(TextBubble, {
        txt: "12:30 AM",
        type: "transparent",
        bold: true,
        lineHeight: "small"
      })]
    }), /*#__PURE__*/_jsxs("div", {
      style: {
        width: 200,
        marginBottom: 50,
        display: 'flex',
        flexDirection: 'column'
      },
      children: ["Basic: bg-gray", /*#__PURE__*/_jsx(TextBubble, {
        txt: "\u4E3B\u6301\u4EBA(\u6211) \u5F00\u542F\u4E86\u804A\u5929\u5BA4\u7981\u8A00",
        type: "gray",
        lineHeight: "large",
        marginBottom: 15
      })]
    }), /*#__PURE__*/_jsxs("div", {
      style: {
        width: 300,
        marginBottom: 50,
        display: 'flex',
        flexDirection: 'column'
      },
      children: ["Icon Text & bg-gray_2:", /*#__PURE__*/_jsx(TextBubble, {
        styles: {
          minWidth: 312,
          maxHeight: 37
        },
        txt: /*#__PURE__*/_jsx(IconText, {
          icon: FcrIconType.FCR_SETTING_NONE,
          colors: {
            iconPrimary: 'var(--fcr_ui_scene_icontext1)'
          },
          txt: "\u5168\u4F53\u7981\u8A00"
        }),
        type: "gray_2",
        lineHeight: "large"
      })]
    })]
  });
};
export default meta;