# This software is dual-licensed under the GNU General Public License (GPL) 
# and a commercial license.
#
# You may use this software under the terms of the GNU GPL v3 (or, at your option,
# any later version) as published by the Free Software Foundation. See 
# <https://www.gnu.org/licenses/> for details.
#
# If you require a proprietary/commercial license for this software, please 
# contact us at jimuflow@gmail.com for more information.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#
# Copyright (C) 2024-2025  Weng Jing

from enum import Enum


class StepMode(Enum):
    STEP_OVER = 1
    STEP_INTO = 2
    STEP_OUT = 3


class ProcessVarScope(Enum):
    GLOBAL = 1
    LOCAL = 2


class ProcessVar:
    def __init__(self, name):
        self._name = name

    @property
    def name(self):
        return self._name


def is_empty(value):
    if isinstance(value, str):
        return not value.strip()
    elif isinstance(value, (list, dict)):
        return len(value) == 0
    else:
        return value is None
