import "@emotion/react";
import { useState, useEffect } from "react";
import { jsx, jsxs } from "@emotion/react/jsx-runtime";
import { modalStyle, TabBarContainer, IconContainer, ContentContainer } from "./style.js";
import "react-dom";
import "../Modal/NormalModal/ModalWrap.js";
import "../Button/Button/style.js";
import "../../styles.js";
import "../CheckBox/style.js";
import "../RadioButton/RadioButtonWrap.js";
import "../Select/Select/SelectWrap.js";
import "../Input/style.js";
import "../UploadCell/UploadCellWrap.js";
import "../Loading/Loading/LoadingWrap.js";
import "../Loading/FolderLoading/style.js";
import "../Avatar/style.js";
import "../Message/index.js";
import "../Divider/styles.js";
import "../Header/styles.js";
import "../Media/index.js";
import "../Textarea/styled.js";
import "../Switch/styled.js";
import "../Button/NormalButton/style.js";
import "../Button/SmallButton/style.js";
import { FullScreenModal } from "../Modal/FullScreenModal/index.js";
import "../Modal/CardModal/ModalWrap.js";
const BottomTabBar = function({
  defaultVisible = true,
  duration,
  controlVisible,
  onCancel,
  modalId,
  icon,
  tips,
  actions,
  hidden = false,
  cssStyle,
  className,
  style
}) {
  const [visible, setVisible] = useState();
  useEffect(() => {
    if (controlVisible !== void 0) {
      setVisible(controlVisible);
    }
  }, [controlVisible]);
  useEffect(() => {
    if (defaultVisible === true && controlVisible !== void 0 && duration !== void 0) {
      setTimeout(() => {
        setVisible(false);
      }, duration);
    }
  }, []);
  return /* @__PURE__ */ jsx(
    FullScreenModal,
    {
      defaultVisible,
      controlVisible: visible,
      onCancel,
      id: modalId,
      rootStyle: modalStyle,
      hidden,
      children: /* @__PURE__ */ jsxs(TabBarContainer, { cssStyle, className, style, children: [
        /* @__PURE__ */ jsx(IconContainer, { children: icon }),
        /* @__PURE__ */ jsxs(ContentContainer, { children: [
          tips,
          actions
        ] })
      ] })
    }
  );
};
export {
  BottomTabBar
};
//# sourceMappingURL=index.js.map
