import { Direction } from '@minecraft/server';
export const DirectionType = {
    Horizontal: [
        Direction.North,
        Direction.East,
        Direction.South,
        Direction.West
    ],
    Vertical: [Direction.Up, Direction.Down]
};
export function fromHorizontalIndex(index) {
    return DirectionType.Horizontal[index % DirectionType.Horizontal.length];
}
export function fromVerticalIndex(index) {
    return DirectionType.Vertical[index % DirectionType.Vertical.length];
}
export function toVector3(direction) {
    switch (direction) {
        case Direction.Down:
            return { x: 0, y: -1, z: 0 };
        case Direction.Up:
            return { x: 0, y: 1, z: 0 };
        case Direction.North:
            return { x: 0, y: 0, z: -1 };
        case Direction.South:
            return { x: 0, y: 0, z: 1 };
        case Direction.West:
            return { x: -1, y: 0, z: 0 };
        case Direction.East:
            return { x: 1, y: 0, z: 0 };
    }
}
