#!/usr/bin/env python
# -*- coding: utf-8 -*-
##################################################################
#
# Copyright (c) 2023 CICV, Inc. All Rights Reserved
#
##################################################################
"""
@Authors:           yangzihao(yangzihao@china-icv.cn)
@Data:              2023/11/24
@Last Modified:     2023/11/24
@Summary:           Merge csv files.
"""

from status import ACCStatusType, LKAStatusType, LDWStatusType, ICAStatusType, AEBStatusType


def acc_status_mapping(value):
    if value == ACCStatusType.Off.value:
        return "Off"
    elif value == ACCStatusType.Active.value:
        return "Active"
    elif value == ACCStatusType.Override.value:
        return "Override"
    elif value == ACCStatusType.Shut_off.value:
        return "Shut_off"
    elif value == ACCStatusType.Standby.value:
        return "Standby"
    elif value == ACCStatusType.Passive.value:
        return "Passive"
    elif value == ACCStatusType.Stand_active.value:
        return "Stand_active"


def lka_status_mapping(value):
    if value == LKAStatusType.Off.value:
        return "Off"
    elif value == LKAStatusType.Passive.value:
        return "Passive"
    elif value == LKAStatusType.Standby.value:
        return "Standby"
    elif value == LKAStatusType.Active.value:
        return "Active"
    elif value == LKAStatusType.Error.value:
        return "Error"


def ldw_status_mapping(value):
    if value == LDWStatusType.Off.value:
        return "Off"
    elif value == LDWStatusType.Passive.value:
        return "Passive"
    elif value == LDWStatusType.Standby.value:
        return "Standby"
    elif value == LDWStatusType.Active.value:
        return "Active"
    elif value == LDWStatusType.Error.value:
        return "Error"


def ica_status_mapping(value):
    if value == ICAStatusType.Off.value:
        return "Off"
    elif value == ICAStatusType.Passive.value:
        return "Passive"
    elif value == ICAStatusType.Standby.value:
        return "Standby"
    elif value == ICAStatusType.Only_Longitudinal_Control.value:
        return "Only_Longitudinal_Control"
    elif value == ICAStatusType.LLC_Follow_Line.value:
        return "LLC_Follow_Line"
    elif value == ICAStatusType.LLC_Follow_Vehicle.value:
        return "LLC_Follow_Vehicle"
    elif value == ICAStatusType.Error.value:
        return "Error"


def aeb_status_mapping(value):
    if value == AEBStatusType.Off.value:
        return "Off"
    elif value == AEBStatusType.Passive.value:
        return "Passive"
    elif value == AEBStatusType.Standby.value:
        return "Standby"
    elif value == AEBStatusType.Active.value:
        return "Active"
    elif value == AEBStatusType.Error.value:
        return "Error"
