/**
 * Creates a div element with the provided class name.
 * @param className
 */
export function div(className: string): HTMLDivElement
{
    const element = document.createElement('div');

    element.className = className;

    return element;
}

/**
 * Creates a button element with a pointer handler.
 * @param name
 * @param callback
 * @param className
 */
export function button(name: string, callback: (event: PointerEvent) => void, className = ''): HTMLButtonElement
{
    const element = document.createElement('button');

    element.className = className;
    element.addEventListener('pointerdown', callback);
    element.innerHTML = name;

    return element;
}
