[**@wocart/theme v4.1.0**](../../README)

***

[@wocart/theme](../../README) / [index](../README) / moveInstance

# Function: moveInstance()

> **moveInstance**(`theme`, `page`, `id`, `placement?`): [`DocumentEdit`](../type-aliases/DocumentEdit)

Move an instance (with everything inside it) to a placement. `index` counts
positions in the destination after the instance has left its old place.
A fixed block never moves; a required one moves only within its own list,
unless enough of its type stay behind.

## Parameters

### theme

[`ThemeDefinition`](../interfaces/ThemeDefinition)

### page

[`PageData`](../interfaces/PageData)

### id

`string`

### placement?

[`InstancePlacement`](../interfaces/InstancePlacement)

## Returns

[`DocumentEdit`](../type-aliases/DocumentEdit)
