# Type Alias: NablaConnectState

> **NablaConnectState** = `object`

An immutable snapshot of the encounter, as `stateChanged` and `getCurrentState()` give it.

## Properties[​](#properties "Direct link to Properties")

### availableActions[​](#availableactions "Direct link to availableActions")

> `readonly` **availableActions**: readonly [`AvailableAction`](/connect/sdk/reference/type-aliases/AvailableAction.md)\[]

The commands the iframe accepts right now.

***

### canBeClosed[​](#canbeclosed "Direct link to canBeClosed")

> `readonly` **canBeClosed**: `boolean`

`true` when closing or navigating away loses nothing.

#### Remarks[​](#remarks "Direct link to Remarks")

It does not depend on `state`: it is `false` while audio is recorded or uploaded, and while note edits are not saved. Read it here, or wait with NablaConnectClient.waitUntilClosable.

***

### failureReason[​](#failurereason "Direct link to failureReason")

> `readonly` **failureReason**: [`NoteGenerationFailureReason`](/connect/sdk/reference/type-aliases/NoteGenerationFailureReason.md) | `null`

Set when `reason` is `NOTE_GENERATION_FAILED`, `null` otherwise.

***

### reason[​](#reason "Direct link to reason")

> `readonly` **reason**: [`NablaConnectStateReason`](/connect/sdk/reference/type-aliases/NablaConnectStateReason.md) | `null`

Why this state was published, `null` when the change came from the iframe or the provider.

***

### state[​](#state "Direct link to state")

> `readonly` **state**: [`EncounterState`](/connect/sdk/reference/type-aliases/EncounterState.md)

Where the encounter is.
