from pathlib import Path


def get_download_and_data_dirs(notebook="local"):
    """
    Return DOWNLOAD_DIR and DATA_DIR depending on the type of notebook being
    used.

    Parameters
    ----------
    notebook : str, optional {'local', 'colab'}
        The type of notebook you are working in

    Returns
    -------
    DOWNLOAD_DIR, DATA_DIR : tuple of Path objects
        Filepaths to the download and data directories respectively
    """
    if notebook.lower() == "colab":
        projects_dir = "/content/drive/MyDrive/1 Projects/"
        DOWNLOAD_DIR = Path(projects_dir + "bitcoin_price_predictor/download")
        DATA_DIR = Path(projects_dir + "bitcoin_price_predictor/data")
    elif notebook.lower() == "local":
        DOWNLOAD_DIR = Path("../download")
        DATA_DIR = Path("../data")
    else:
        raise ValueError(
            f"""You entered {notebook} but the only supported
                notebook types are: colab or local"""
        )
    return DOWNLOAD_DIR, DATA_DIR