<template>
  <GnConfirmDialog
    v-model:open="visible"
    :message="message"
    title="Requires confirmation"
    cancel-text="No"
    confirm-text="Yes"
    confirm-variant="warning"
    @confirm="onConfirm"
    @cancel="onCancel"
  />
</template>

<script setup>
import { useConfirmState, _confirmResolve } from '@/composables/useConfirm.js'

const { visible, message } = useConfirmState()

function onConfirm() { _confirmResolve(true) }
function onCancel()  { _confirmResolve(false) }
</script>
