import os

import cfgtools

numpad_for_customer_name = None


def show_numpad_for_customer_name():
    # type: (...) -> bool

    global numpad_for_customer_name

    if numpad_for_customer_name is None:
        config = cfgtools.read(os.environ["LOADERCFG"])
        show_numpad_config = config.find_value("Customer.ShowNumpadForCustomerName")
        numpad_for_customer_name = (show_numpad_config or "false").lower() == "true"

    return numpad_for_customer_name
