Repository URL to install this package:
|
Version:
3.12.20 ▾
|
import { useDispatch, useSelector } from 'react-redux';
import { SlideTransition } from '@filerobot/common';
import CollectionModal from './CollectionModal';
import PreviewCollectionDialog from './PreviewCollectionDialog';
import { previewCollectionPanelOpened, selectShowCollectionModal, selectShowPreviewCollectionPanel } from '../../../slices/panels.slice';
import { jsx as _jsx } from "react/jsx-runtime";
import { Fragment as _Fragment } from "react/jsx-runtime";
import { jsxs as _jsxs } from "react/jsx-runtime";
var CollectionPanels = function CollectionPanels(_ref) {
var transitionZIndex = _ref.transitionZIndex;
var dispatch = useDispatch();
var showCollectionModal = useSelector(selectShowCollectionModal);
var showPreviewCollectionPanel = useSelector(selectShowPreviewCollectionPanel);
var onClosePreviewCollection = function onClosePreviewCollection() {
dispatch(previewCollectionPanelOpened({
showPreviewCollectionPanel: false
}));
};
return /*#__PURE__*/_jsxs(_Fragment, {
children: [showCollectionModal && /*#__PURE__*/_jsx(CollectionModal, {}, "collection"), /*#__PURE__*/_jsx(SlideTransition, {
zIndex: transitionZIndex,
handleClose: onClosePreviewCollection,
children: showPreviewCollectionPanel && /*#__PURE__*/_jsx(PreviewCollectionDialog, {}, "PreviewCollection")
})]
});
};
export default CollectionPanels;