2024-09-17 11:01:30 -07:00
|
|
|
import { useModalsStore } from 'pl-fe/stores';
|
2024-08-18 08:50:56 -07:00
|
|
|
|
2024-09-17 11:01:30 -07:00
|
|
|
import type { ModalType } from 'pl-fe/features/ui/components/modal-root';
|
|
|
|
import type { OpenModalProps } from 'pl-fe/stores/modals';
|
2023-05-30 06:04:50 -07:00
|
|
|
|
2024-09-17 11:01:30 -07:00
|
|
|
const openModal = (...props: OpenModalProps) => () => {
|
|
|
|
useModalsStore.getState().openModal(...props);
|
|
|
|
};
|
2024-05-12 16:18:04 -07:00
|
|
|
|
2024-09-17 11:01:30 -07:00
|
|
|
const closeModal = (type?: ModalType) => () => {
|
|
|
|
useModalsStore.getState().closeModal(type);
|
|
|
|
};
|
2024-08-16 15:26:29 -07:00
|
|
|
|
2024-05-12 16:18:04 -07:00
|
|
|
export {
|
|
|
|
openModal,
|
|
|
|
closeModal,
|
|
|
|
};
|