---
url: "https://vueda.dev/v3/reference/api/js/use/useConfirmationController/types/ConfirmationController.md"
title: "ConfirmationController"
---

# ConfirmationController

## Properties

### bulk {#bulk}

Whether `messages` uses the per-object shape (`true`) or the aggregate
 shape (`false`). Set from the `bulk` option passed to `request()`, which in turn comes from the
 `ConfirmationRequiredError` that reported the warnings -- the only place that knows which
 request path (single-object or bulk) produced them.

Type: `boolean`

Source: `client/lib/use/useConfirmationController.js:27`

### cancel {#cancel}

Resolve the pending request with `false`.

Type: `() => void`

Source: `client/lib/use/useConfirmationController.js:38`

### confirm {#confirm}

Resolve the pending request with `true`.

Type: `() => void`

Source: `client/lib/use/useConfirmationController.js:37`

### consumers {#consumers}

Number of registered consumers able to resolve a request.

Type: `number`

Source: `client/lib/use/useConfirmationController.js:31`

### messages {#messages}

Warnings to display.

Type: [WarningsMapping](/v3/reference/api/js/use/useConfirmationController/types/WarningsMapping.md)

Source: `client/lib/use/useConfirmationController.js:26`

### open {#open}

Whether the confirmation dialog should be shown.

Type: `boolean`

Source: `client/lib/use/useConfirmationController.js:25`

### register {#register}

Announce a consumer that renders the dialog and will call `confirm()`/`cancel()`.

Type: `() => void`

Source: `client/lib/use/useConfirmationController.js:32`

### request {#request}

Open the
 dialog and resolve to the user's choice (true = confirm, false = cancel). Resolves `false` immediately when
 no consumer is registered.

Type: `(messages: WarningsMapping, options: object) => Promise`

Source: `client/lib/use/useConfirmationController.js:34`

### unregister {#unregister}

Remove a previously registered consumer.

Type: `() => void`

Source: `client/lib/use/useConfirmationController.js:33`

## Source

`client/lib/use/useConfirmationController.js:24`
