import { useStyles } from './styles';
import { memo, useEffect, useRef } from 'react';
import { useBottomSheet } from '../../../core/stores/slices/bottomSheetSlice';
import BottomSheet from '@devvie/bottom-sheet';
const BottomSheetComponent = () => {
  const sheetRef = useRef(null);
  const {
    closeBottomSheet,
    content,
    open,
    height,
    dark
  } = useBottomSheet();
  const {
    styles
  } = useStyles({
    dark
  });
  useEffect(() => {
    open ? sheetRef.current.open() : sheetRef.current.close();
  }, [open]);
  return /*#__PURE__*/React.createElement(BottomSheet, {
    ref: sheetRef,
    height: height,
    closeOnDragDown: true,
    closeOnBackdropPress: true,
    style: styles.container,
    onClose: closeBottomSheet,
    disableBodyPanning: true
  }, content);
};
export default /*#__PURE__*/memo(BottomSheetComponent);
//# sourceMappingURL=BottomSheetComponent.js.map