# Copyright Spack Project Developers. See COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
"""Enumerations used throughout Spack"""
import enum


class InstallRecordStatus(enum.Flag):
    """Enum flag to facilitate querying status from the DB"""

    INSTALLED = enum.auto()
    DEPRECATED = enum.auto()
    MISSING = enum.auto()
    ANY = INSTALLED | DEPRECATED | MISSING


class ConfigScopePriority(enum.IntEnum):
    """Priorities of the different kind of config scopes used by Spack"""

    DEFAULTS = 0
    CONFIG_FILES = 1
    ENVIRONMENT = 2
    CUSTOM = 3
    COMMAND_LINE = 4


class PropagationPolicy(enum.Enum):
    """Enum to specify the behavior of a propagated dependency"""

    NONE = enum.auto()
    PREFERENCE = enum.auto()
