"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;
var _styles = require("./styles");
var _react = require("react");
var _bottomSheetSlice = require("../../../core/stores/slices/bottomSheetSlice");
var _bottomSheet = _interopRequireDefault(require("@devvie/bottom-sheet"));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
const BottomSheetComponent = () => {
  const sheetRef = (0, _react.useRef)(null);
  const {
    closeBottomSheet,
    content,
    open,
    height,
    dark
  } = (0, _bottomSheetSlice.useBottomSheet)();
  const {
    styles
  } = (0, _styles.useStyles)({
    dark
  });
  (0, _react.useEffect)(() => {
    open ? sheetRef.current.open() : sheetRef.current.close();
  }, [open]);
  return /*#__PURE__*/React.createElement(_bottomSheet.default, {
    ref: sheetRef,
    height: height,
    closeOnDragDown: true,
    closeOnBackdropPress: true,
    style: styles.container,
    onClose: closeBottomSheet,
    disableBodyPanning: true
  }, content);
};
var _default = exports.default = /*#__PURE__*/(0, _react.memo)(BottomSheetComponent);
//# sourceMappingURL=BottomSheetComponent.js.map