import { Engine } from "/Scripts/types/engine";
import { Hook } from "/Scripts/types/hook";

/**
 * The client-wide hooks
 */
export const clientHooks: Hook[] = [
    {
        signal: "OPEN_VOXEL",
        callback: (engine: Engine) => {
            engine.classes.menuUtils.static.openVoxel()
        }
    },
    {
        signal: "ADD_VOXEL",
        callback: (engine: Engine) => {
            engine.classes.voxelUtils.static.applyEdit()
        }
    },
    {
        signal: "OPEN_SPAWN_SELECT",
        callback: (engine: Engine) => {
            engine.classes.menuUtils.static.openSpawnSelection()
        }
    },
    {
        signal: "LEVEL_EDIT_SPAWN",
        callback: (engine: Engine) => {
            engine.classes.levelEditorUtils.static.spawnEntity()
        }
    },
    {
        signal: "INSPECTOR",
        callback: (engine: Engine) => {
            engine.classes.levelEditorUtils.static.inspectEntity()
        }
    },
    {
        signal: "SPAWN_WATER",
        callback: (engine: Engine) => {
            engine.classes.voxelUtils.static.spawnWater()
        }
    },
    {
        signal: "DIG",
        callback: (engine: Engine) => {
            engine.classes.voxelUtils.static.applyEdit()
        }
    }
]