from typing import Dict
from typing import List


def _load_ebookconvert_params(dict_: Dict) -> List[str]:
    """Loads ebookconvert command line parameters from a dictionary.

    Prepends -- to parameters that are missing it, making -- optional within the
    ebookconvert_params block of the project file.

    Args:
        dict_: The dictionary.

    Returns:
        The list of ebookconvert command line parameters.
    """
    ebookconvert_params = []

    if 'ebookconvert_params' not in dict_:
        return ebookconvert_params

    param_list = dict_['ebookconvert_params']

    for param in param_list:
        param = param.strip()
        if param.startswith('--'):
            ebookconvert_params.append(param)
        else:
            ebookconvert_params.append(f'--{param}')

    return ebookconvert_params