import type { Component } from "vue"; const showDialog = ref(false); const dialogParams = ref({}); const dialogComponent = ref(); function closeDialog() { showDialog.value = false; } function openDialog(component: Component, params: any) { dialogComponent.value = component; dialogParams.value = params; showDialog.value = true; } export function useCustomDialog() { return { showDialog, closeDialog, openDialog, dialogParams, dialogComponent }; }