# -*- coding: utf-8 -*-
#
# Copyright 2016 Continuum Analytics, Inc.
# May be copied and distributed freely only as part of an Anaconda or
# Miniconda installation.
#

"""
Styles for the application
"""

import os

from anaconda_navigator.data import GLOBAL_STYLES_PATH
from anaconda_navigator.images import IMAGE_PATH


class AnacondaPalette:
    """
    'Enum' holding the main colors used for the Anaconda brand.

    Lower numbers refer to lighter colors.
    """
    primary_blue_1 = '#A4BCC2'
    primary_blue_2 = '#1F7699'
    primary_blue_3 = '#253746'
    primary_blue_4 = '#1B2833'

    primary_gray_1 = '#FCE300'
    primary_gray_2 = '#D3D6D8'
    primary_gray_3 = '#98A4AE'
    primary_gray_4 = '#5C6771'

    secondary_blue_1 = '#0AC2FF'
    secondary_blue_2 = '#089BCC'

    anaconda_green_1 = '#43B02A'
    anaconda_green_2 = '#318239'


def load_style_sheet():
    with open(GLOBAL_STYLES_PATH, 'r') as f:
        data = f.read()
    if os.name == 'nt':
        data = data.replace('$IMAGE_PATH', IMAGE_PATH.replace('\\', '/'))
    else:
        data = data.replace('$IMAGE_PATH', IMAGE_PATH)
    return data
