# GdprGuard
This component exposes a guard's state. It is also responsible for rendering sub-groups if the GdprGroup's recursive props is true.
<GdprGuard :guard="g">
<template #default="{ guard, toggleGuard }">
{{ guard.name }}
<MyAwesomeSwitch
@change="toggleGuard"
:value="guard.enabled"
:disabled="guard.required"/>
</template>
</GdprGuard>
Props
| props | Type | Description | Required | Default |
|---|---|---|---|---|
| guard | GdprGuardRaw (opens new window) | The guard to manage | ✔️ | ❌ |
Slot scope
| Slot props | Type | Description |
|---|---|---|
| guard | GdprGuardRaw (opens new window) | allows access to the guard's state |
| toggleGuard | () => void | toggle the group state and set every state to its new value |
| enableGuard | () => void | enable every guards and sub-groups |
| disableGuard | () => void | disable every guards and sub-groups |
| manager | GdprManagerRaw (opens new window) | allows access to the manager's state |
| group | GdprGuardGroupRaw (opens new window) | allows access to the group's state |