# OBSAH SOUBORU:
# - definice vlastnich datovych typu na bazi Enum

from enum import IntEnum, auto, IntFlag, Enum


class ELtxTableType(IntEnum):
    NORMAL = 0
    ROTATED = 1             # pouzije se sidewaystable (tabulka zabira celou stranu)
    LONG = 2
    ROTATED_BOX = 3         # pouzije se rotatebox (musi se specifikovat uhel. glhf u oboustr dokumentu?)


class ETableOptions(IntFlag):
    NONE = auto()
    HEADER_ROW = auto()
    TOTAL_ROW = auto()
    ROW_STRIPES = auto()
    COL_STRIPES = auto()
    FIRST_COL = auto()
    LAST_COL = auto()


class EMergedCell(IntEnum):
    MERGED = 1
    MERGED_EMPTY = 0
    NOT_MERGED = 2


class EConvertedState(IntFlag):
    CONV_ROW = auto()
    CONV_COL = auto()
    NOT_CONV = auto()
    # FULLY = CONV_ROW | CONV_COL


class EFontSize(Enum):
    NORMAL = ''
    tiny = '\\tiny'
    scriptsize = '\\scriptsize'
    footnotesize = '\\footnotesize'
    small = '\\small'
    large = '\\large'
    Large = '\\Large'
    LARGE = '\\LARGE'
    huge = '\\huge'
    # vvvv ---memoir only--- vvvv
    Huge = '\\Huge'
    HUGE = '\\HUGE'
    miniscule = '\\miniscule'


class EFontFlags(IntFlag):
    BOLD = auto()
    ITALIC = auto()
    UNDER = auto()
    DOUBLE_UNDER = auto()
    ROTATED = auto()
    NONE = auto()


class EHAlign(Enum):
    LEFT = 'l'
    RIGHT = 'r'
    CENTER = 'c'
    JUSTIFY = 'j'
    NONE = ''


class EVAlign(Enum):
    TOP = 'h'
    BOTTOM = 'f'
    MIDDLE = 'm'
    NONE = ''


class EBorder(IntFlag):
    NONE = 0
    LEFT = 1
    RIGHT = 2
    TOP = 4
    BOTTOM = 8
    #                                       ||||
    # jen u veci formatovanych jako tabulka vvvv
    INSIDE_H = 16
    INSIDE_V = 32


class EBorderStyle(Enum):
    NONE = ''
    DASHED = 'dashed'
    DOTTED = 'dotted'
    DOUBLE = 'd\b'
    HAIR = '0.1pt'
    MEDIUM = '0.85 pt'
    MEDIUMDASHDOT = 'dotted, 0.85pt'    # teckovany je close enough
    MEDIUMDASHED = 'dashed, 0.85pt'
    THICK = '1.2pt'
    THIN = 't\b'

    # v excelu jsou, v tabularray ne. takze tyto nelze prevest a v tabulce se zobrazi jako obyc okraj
    DASHDOT = THIN
    DASHDOTDOT = THIN
    MEDIUMDASHDOTDOT = MEDIUM
    SLANTDASHDOT = THIN


class EColor(Enum):
    NOT_SET = ''
    BLACK = 'black'
    WHITE = 'white'

    GRAY1 = 'gray1'
    GRAY2 = 'gray2'
    GRAY3 = 'gray3'
    GRAY4 = 'gray4'
    GRAY5 = 'gray5'
    GRAY6 = 'gray6'
    GRAY7 = 'gray7'
    GRAY8 = 'gray8'
    GRAY9 = 'gray9'

    RED = 'red'
    RED1 = 'red1'
    RED2 = 'red2'
    RED3 = 'red3'
    RED4 = 'red4'
    RED5 = 'red5'
    RED6 = 'red6'
    RED7 = 'red7'
    RED8 = 'red8'
    RED9 = 'red9'

    BROWN = 'brown'
    BROWN1 = 'brown1'
    BROWN2 = 'brown2'
    BROWN3 = 'brown3'
    BROWN4 = 'brown4'
    BROWN5 = 'brown5'
    BROWN6 = 'brown6'
    BROWN7 = 'brown7'
    BROWN8 = 'brown8'
    BROWN9 = 'brown9'

    YELLOW = 'yellow'
    YELLOW1 = 'yellow1'
    YELLOW2 = 'yellow2'
    YELLOW3 = 'yellow3'
    YELLOW4 = 'yellow4'
    YELLOW5 = 'yellow5'
    YELLOW6 = 'yellow6'
    YELLOW7 = 'yellow7'
    YELLOW8 = 'yellow8'
    YELLOW9 = 'yellow9'

    OLIVE = 'olive'
    OLIVE1 = 'olive1'
    OLIVE2 = 'olive2'
    OLIVE3 = 'olive3'
    OLIVE4 = 'olive4'
    OLIVE5 = 'olive5'
    OLIVE6 = 'olive6'
    OLIVE7 = 'olive7'
    OLIVE8 = 'olive8'
    OLIVE9 = 'olive9'

    GREEN = 'green'
    GREEN1 = 'green1'
    GREEN2 = 'green2'
    GREEN3 = 'green3'
    GREEN4 = 'green4'
    GREEN5 = 'green5'
    GREEN6 = 'green6'
    GREEN7 = 'green7'
    GREEN8 = 'green8'
    GREEN9 = 'green9'

    TEAL = 'teal'
    TEAL1 = 'teal1'
    TEAL2 = 'teal2'
    TEAL3 = 'teal3'
    TEAL4 = 'teal4'
    TEAL5 = 'teal5'
    TEAL6 = 'teal6'
    TEAL7 = 'teal7'
    TEAL8 = 'teal8'
    TEAL9 = 'teal9'

    CYAN = 'cyan'
    CYAN1 = 'cyan1'
    CYAN2 = 'cyan2'
    CYAN3 = 'cyan3'
    CYAN4 = 'cyan4'
    CYAN5 = 'cyan5'
    CYAN6 = 'cyan6'
    CYAN7 = 'cyan7'
    CYAN8 = 'cyan8'
    CYAN9 = 'cyan9'

    AZURE = 'azure'
    AZURE1 = 'azure1'
    AZURE2 = 'azure2'
    AZURE3 = 'azure3'
    AZURE4 = 'azure4'
    AZURE5 = 'azure5'
    AZURE6 = 'azure6'
    AZURE7 = 'azure7'
    AZURE8 = 'azure8'
    AZURE9 = 'azure9'

    BLUE = 'blue'
    BLUE1 = 'blue1'
    BLUE2 = 'blue2'
    BLUE3 = 'blue3'
    BLUE4 = 'blue4'
    BLUE5 = 'blue5'
    BLUE6 = 'blue6'
    BLUE7 = 'blue7'
    BLUE8 = 'blue8'
    BLUE9 = 'blue9'

    VIOLET = 'violet'
    VIOLET1 = 'violet1'
    VIOLET2 = 'violet2'
    VIOLET3 = 'violet3'
    VIOLET4 = 'violet4'
    VIOLET5 = 'violet5'
    VIOLET6 = 'violet6'
    VIOLET7 = 'violet7'
    VIOLET8 = 'violet8'
    VIOLET9 = 'violet9'

    MAGENTA = 'magenta'
    MAGENTA1 = 'magenta1'
    MAGENTA2 = 'magenta2'
    MAGENTA3 = 'magenta3'
    MAGENTA4 = 'magenta4'
    MAGENTA5 = 'magenta5'
    MAGENTA6 = 'magenta6'
    MAGENTA7 = 'magenta7'
    MAGENTA8 = 'magenta8'
    MAGENTA9 = 'magenta9'

    PURPLE = 'purple'
    PURPLE1 = 'purple1'
    PURPLE2 = 'purple2'
    PURPLE3 = 'purple3'
    PURPLE4 = 'purple4'
    PURPLE5 = 'purple5'
    PURPLE6 = 'purple6'
    PURPLE7 = 'purple7'
    PURPLE8 = 'purple8'
    PURPLE9 = 'purple9'
