import type { ConfirmationOptions } from "primevue/confirmationoptions"; import { useConfirm } from "primevue"; import VButton from "../button/VButton.vue"; export function useConfirmModal() { const confirm = useConfirm(); const showConfirmModal = ({ acceptProps = VButton, rejectProps = VButton, group = '', header = '', message = '', icon = '', accept = Function, reject = Function, onHide = Function, onShow = Function, modal = true, blockScroll = true, position = 'center', appendTo = 'body', }: ConfirmationOptions) => { confirm.require({ group, header, message, icon, rejectProps, acceptProps, accept, reject, onHide, onShow, modal, blockScroll, position, appendTo, }) } return {showConfirmModal} }