import { ElMessageBox, type ElMessageBoxOptions } from 'element-plus' export async function confirmAction( message: string, title: string, options?: ElMessageBoxOptions, ): Promise { try { await ElMessageBox.confirm(message, title, options) return true } catch (error) { if (error === 'cancel' || error === 'close') return false throw error } }