/*!
 *
 * Copyright (c) 2019-2024 Diality Inc. - All Rights Reserved.
 * \copyright
 * THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, IN PART OR IN
 * WHOLE, WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER.
 *
 * \file    Colors.qml
 * \author  (last)      Vy
 * \date    (last)      17-May-2023
 * \author  (original)  Behrouz NematiPour
 * \date    (original)  17-Oct-2019
 *
 */

// Qt
pragma Singleton
import QtQuick 2.12

// Project
import Gui.Actions 0.1


/*!
 * \brief
 * Colors.qml file includes all the colors definitions
 * whcih is going to be used in the project
 */
QtObject {
    readonly property color red                             : "#c53b33"         // red
    readonly property color white                           : "white"           // white
    readonly property color transparent                     : "Transparent"     // No Color
    readonly property color offWhite                        : "#FEFEFE"

    readonly property color separatorLine                   : "#5f809d"
    readonly property color backgroundMain                  : "#1A344D"         //// ----- @LEAHIZED
    readonly property color backgroundButtonNormal          : transparent
    readonly property color backgroundButtonSelect          : "#438FEB"
    readonly property color backgroundButtonSelectDark      : "#135088" // "#214773"
    readonly property color backgroundDialog                : "#254670"
    readonly property color backgroundMenu                  : "#14314C"
    readonly property color backgroundMainMenu              : "#0F2841"         //// ----- @LEAHIZED
    readonly property color backgroundDottedMenu            : "#64809D"
    readonly property color backgroundSlider                : "#195187"
    readonly property color treatmentSectionHeader          : "#1A2E42"
    readonly property color treatmentSectionMain            : "#1A3046"
    readonly property color mainTreatmentLighterBlue        : "#1F3D5A"
    readonly property color mainTreatmentDarkerBlue         : "#142C49"
    readonly property color mainTreatmentOrange             : "#FFB836"
    readonly property color mainTreatmentIsoBlue            : "#C3F9FF"
    readonly property color mainTreatmentGreen              : "#BBFFA3"

    readonly property color sliderHighlightColor            : "orange"
    readonly property color sliderProgressBorderActive      : white

    readonly property color backgroundUltrafiltrationButton : "#31568F"
    readonly property color textValueUltrafiltrationButtonFg: "#98aec2"
    readonly property color dialogText                      : "#343434"
    readonly property color alarmDialogText                 : "#343434"
    readonly property color alarmDialogGreyText             : "#838080"
    readonly property color dialogShadowColor               : "#334E759C"
    readonly property color dialogValueColor                : "#3D8EEF"

    readonly property color backgroundRangeRect             : "#3e546e"
    readonly property color highlightProgressBar            : "#3d8eef"
    readonly property color highlightMedProgressBar         : "#1b2b3e"
    readonly property color textProgressBar                 : "#88a3c5"
    readonly property color progressBarSaline               : "#73D8DF"
    readonly property color progressBarUltrafiltration      : "#67ACFF"
    readonly property color comboBoxDisplay                 : "#B31B2B3E"

    readonly property color textRangeMarker                 : white
    readonly property color rangeMarker                     : white
    readonly property color rangeMarkerShort                : "#9fb6d1"

    readonly property color textMain                        : "#FCFCFC"
    readonly property color textButton                      : "#FCFCFC" //"#E8E8E8"
    readonly property color textDisableButton               : "#607A91"
    readonly property color textTickMark                    : "#438FEB"
    readonly property color textInvalid                     : red

    readonly property color borderButton                    : "#4696F7"     //// ----- @LEAHIZED
    readonly property color borderButtonHalfDarker          : Qt.darker(borderButton, 1.50)
    readonly property color borderButtonSelected            : "#db8f00"
    readonly property color borderButtonUnselected          : "#53667d"
    readonly property color borderDisableButton             : "#607A91"
    readonly property color boderSeparatorLine              : "#476982"
    readonly property color borderDialog                    : transparent // different colors for different displays // "#D01A344D" // "#D00F0F0F" //"#F51A344D"
    readonly property color buttonDisableColor              : "#515050"
    readonly property color pauseColor                      : "#9B864E"

    readonly property color panelBackgroundColor            : "#12FFFFFF"
    readonly property color panelBorderColor                : "#4DB5B5B5"
    readonly property color panelInvalidBorderColor         : "#FFA500"
    readonly property color heparinPanelBorderColor         : "#CC42556B"
    readonly property color heparinSectionHeader            : "#384B60"
    readonly property color heparinActive                   : "#429C4A"
    readonly property color heparinPaused                   : "#D9A23D"
    readonly property color heparinComplete                 : "#276FCD"

    readonly property color touchTextAreaTitle              : "#a0b6d0"

    readonly property color textTextRectTitle               : white
    readonly property color textTextRectLabel               : "#e8e8e8"
    readonly property color textTextRectExtra               : "#708795"

    readonly property color line                            : "#094266"

    readonly property color pressuresText                   : white
    readonly property color pressuresArterialBar            : "#FF8282"
    readonly property color pressuresVenousBar              : "#31bcdb"
    readonly property color pressuresTmpBar                 : "#818181"
    readonly property color pressuresOutOfRangeBg           : red
    readonly property color pressureBorderActive            : "#cccccc" // this is the active border around the red

    readonly property color fluidText                       : white
    readonly property color fluidValue                      : white
    readonly property color fluidUnit                       : "#708795"

    readonly property color textNotificationNoneBg          : white
    readonly property color textNotificationNoneFg          : "#1b2b3e"

    readonly property color textNotificationLowBg           : "#f5a623"     // ?
    readonly property color textNotificationLowFg           : white         // ?

    readonly property color textNotificationMedBg           : "#f5a623"     // ?
    readonly property color textNotificationMedFg           : white         // ?

    readonly property color textNotificationHighBg          : red
    readonly property color textNotificationHighFg          : white

    readonly property color alarmTopBarHighBg               : red
    readonly property color alarmTopBarHighFg               : white

    readonly property color alarmTopBarMedBg                : "#db8f00"
    readonly property color alarmTopBarMedFg                : white

    readonly property color alarmTopBarLowBg                : "#db8f00"
    readonly property color alarmTopBarLowFg                : white

    readonly property color alarmTopBarNoneBg               : "#db8f00"
    readonly property color alarmTopBarNoneFg               : white

    readonly property color createTrProfileID               : "#ffbb44"
    readonly property color dropShadowDialogColor           : "#4DFFF8E1"

    readonly property color createTreatmentActive           : "#3d8eef"
    readonly property color createTreatmentInactive         : backgroundRangeRect
    readonly property color createTreatmentNotReady         : "#1f4974"
    readonly property color createTreatmentReady            : "#438FEB"
    readonly property color createTreatmentTextNotReady     : "#507090"
    readonly property color createTreatmentTextReady        : white
    readonly property color createTreatmentInvalidParam     : red

    readonly property color scrollBarBgColor                : white //"#80696969" // half transparent dimgray
    readonly property color scrollBarColor                  : "#6992BC"

    readonly property color ufVolumeGoalText                : "#f5be59"
    readonly property color ufNotificationBarBg             : "#0f2841"
    readonly property color ufProgressBarFill               : "#2083FA"
    readonly property color ufAdjustmentDeltaFill           : "#747974"
    readonly property color ufAdjustmentProgressBarBg       : "#2C517D"
    readonly property color progressBarMinMax               : "#c7c7c7"

    readonly property color roFeatured                      : "#E79DF6"
    readonly property color roDefeatured                    : "#F9CD74"
    // ---------- < PRS > Related Section ----------
    // Alarm priority colors
    function alarmPriorityColors(vPriority) {
        let titleBg   = ""
        let titleFg   = ""
        let contentBg = ""
        let contentFg = ""
        switch (vPriority) {
        case GuiActions.ALARM_PRIORITY_HIGH:
            titleBg   = alarmTopBarHighBg
            titleFg   = alarmTopBarHighFg
            contentBg = white
            contentFg = textNotificationHighFg
            break
        case GuiActions.ALARM_PRIORITY_MEDIUM:
            titleBg   = alarmTopBarMedBg
            titleFg   = alarmTopBarMedFg
            contentBg = white
            contentFg = textNotificationMedFg
            break
        case GuiActions.ALARM_PRIORITY_LOW:
            titleBg   = alarmTopBarLowBg
            titleFg   = alarmTopBarLowFg
            contentBg = white
            contentFg = textNotificationLowFg
            break
        default : // GuiActions.ALARM_PRIORITY_NONE
            titleBg   = backgroundButtonSelect
            titleFg   = textMain
            contentBg = white
            contentFg = textMain
        }
        return [titleBg   ,
                titleFg   ,
                contentBg ,
                contentFg ]
    }
}
