"""This module contains the ``current_licence_flags`` method for the ``licences`` app"""

from constance import config

from .constants import LICENCES


def current_licence_flags():
    """The flags of the current active licence type

    Returns
    -------
    dict

    """

    licence_flags = LICENCES[config.LICENCE]

    # We need to multiply the `MAX_MEDIA_STORAGE` by the number of licence
    if licence_flags['MAX_MEDIA_STORAGE']:
        licence_flags['MAX_MEDIA_STORAGE'] = (
            licence_flags['MAX_MEDIA_STORAGE'] * config.NBR_LICENCE
        )

    return licence_flags
