"""This module contains the constants for the ``data_export`` app"""

from extended_choices import Choices


# The styles for excel export
# ---------------------------

EXCEL_HEADERS_HEIGHT = 50
EXCEL_MAXIMUM_COLUMN_LENGTH = 50

# For the available styles attributes see http://xlsxwriter.readthedocs.io/format.html
# The values of this choices must be tuples and will be casted to a dict
# to be used in ``ExcelDataExporter``.
# So ``('text_wrap', True)`` will become ``{'text_wrap': true}`` when used to format excel cells.
EXCEL_STYLE_CHOICES = Choices(
    ('DEFAULT', (), 'default'),
    (
        'HEADER',
        (
            ('text_wrap', True),
        ),
        'header'
    ),
    (
        'WORKSHOP_STEP',
        (
            ('bg_color', '#999999'),
            ('bold', True),
        ),
        'workshop_step'
    ),
    (
        'WORKSHOP_STEP_ANSWER_VALID',
        (
            ('bg_color', '#93C47D'),
        ),
        'workshop_step_answer_valid'
    )
)
