from types import FunctionType

from .function_definitions import (
    abbreviate,
    add,
    boolean,
    case,
    copy,
    divide,
    equal_to,
    first,
    greater_than,
    hide,
    last,
    less_than,
    logical_and,
    logical_not,
    logical_or,
    logical_xor,
    match,
    multiply,
    rand,
    repeat,
    reverse,
    save,
    separator,
    subtract,
    sync,
    while_loop,
)

function_definitions: dict[str, FunctionType] = {
    "abbr": abbreviate,
    "abbreviate": abbreviate,
    "add": add,
    "and": logical_and,
    "bool": boolean,
    "case": case,
    "copy": copy,
    "divide": divide,
    "div": divide,
    "eq": equal_to,
    "equal_to": equal_to,
    "first": first,
    "greater_than": greater_than,
    "gt": greater_than,
    "hide": hide,
    "last": last,
    "less_than": less_than,
    "lt": less_than,
    "match": match,
    "multiply": multiply,
    "mul": multiply,
    "not": logical_not,
    "or": logical_or,
    "prod": multiply,
    "rand": rand,
    "rep": repeat,
    "reverse": reverse,
    "save": save,
    "sep": separator,
    "subtract": subtract,
    "sub": subtract,
    "x": sync,
    "xor": logical_xor,
    "sync": sync,
    "while": while_loop,
}
