# HooksLibrary

Library to be used when building custom operation hooks

## Functions

### isCallBeforeHook

Check if the current hook call is a before hook call

```solidity
function isCallBeforeHook() internal view returns (bool);
```

**Returns**

| Name     | Type   | Description                                                          |
| -------- | ------ | -------------------------------------------------------------------- |
| `<none>` | `bool` | True if the current hook call is a before hook call, false otherwise |

### isCallAfterHook

Check if the current hook call is an after hook call

```solidity
function isCallAfterHook() internal view returns (bool);
```

**Returns**

| Name     | Type   | Description                                                          |
| -------- | ------ | -------------------------------------------------------------------- |
| `<none>` | `bool` | True if the current hook call is an after hook call, false otherwise |

### isBeforeHook

Check if the provided hook is a before hook

```solidity
function isBeforeHook(address hook) internal pure returns (bool);
```

**Parameters**

| Name   | Type      | Description                      |
| ------ | --------- | -------------------------------- |
| `hook` | `address` | The address of the hook to check |

**Returns**

| Name     | Type   | Description                                                 |
| -------- | ------ | ----------------------------------------------------------- |
| `<none>` | `bool` | True if the provided hook is a before hook, false otherwise |

### isAfterHook

Check if the provided hook is an after hook

```solidity
function isAfterHook(address hook) internal pure returns (bool);
```

**Parameters**

| Name   | Type      | Description                      |
| ------ | --------- | -------------------------------- |
| `hook` | `address` | The address of the hook to check |

**Returns**

| Name     | Type   | Description                                                 |
| -------- | ------ | ----------------------------------------------------------- |
| `<none>` | `bool` | True if the provided hook is an after hook, false otherwise |

### isBeforeAndAfterHook

Check if the provided hook is a before and after hook

```solidity
function isBeforeAndAfterHook(address hook) internal pure returns (bool);
```

**Parameters**

| Name   | Type      | Description                      |
| ------ | --------- | -------------------------------- |
| `hook` | `address` | The address of the hook to check |

**Returns**

| Name     | Type   | Description                                                           |
| -------- | ------ | --------------------------------------------------------------------- |
| `<none>` | `bool` | True if the provided hook is a before and after hook, false otherwise |

## Errors

### HookNotBefore

```solidity
error HookNotBefore();
```

### HookNotAfter

```solidity
error HookNotAfter();
```

### HookNotBeforeAndAfter

```solidity
error HookNotBeforeAndAfter();
```
