# #region DatasetReviewEnums [C:2] [TYPE Module] [SEMANTICS enum, dataset, review, model, domain]
# @BRIEF All enumeration types for the dataset review domain, grouped for stable cross-module reuse.
# @LAYER Domain
# @INVARIANT  Enum values are string-based for JSON serialization compatibility.

import enum


# #region SessionStatus [C:1] [TYPE Class]
# @BRIEF Lifecycle status of a dataset review session.
class SessionStatus(str, enum.Enum):
    ACTIVE = "active"
    PAUSED = "paused"
    COMPLETED = "completed"
    ARCHIVED = "archived"
    CANCELLED = "cancelled"


# #endregion SessionStatus


# #region SessionPhase [C:1] [TYPE Class]
# @BRIEF Ordered phase progression for dataset review orchestration.
class SessionPhase(str, enum.Enum):
    INTAKE = "intake"
    RECOVERY = "recovery"
    REVIEW = "review"
    SEMANTIC_REVIEW = "semantic_review"
    CLARIFICATION = "clarification"
    MAPPING_REVIEW = "mapping_review"
    PREVIEW = "preview"
    LAUNCH = "launch"
    POST_RUN = "post_run"


# #endregion SessionPhase


# #region ReadinessState [C:1] [TYPE Class]
# @BRIEF Granular readiness indicator driving the recommended-action UX flow.
class ReadinessState(str, enum.Enum):
    EMPTY = "empty"
    IMPORTING = "importing"
    REVIEW_READY = "review_ready"
    SEMANTIC_SOURCE_REVIEW_NEEDED = "semantic_source_review_needed"
    CLARIFICATION_NEEDED = "clarification_needed"
    CLARIFICATION_ACTIVE = "clarification_active"
    MAPPING_REVIEW_NEEDED = "mapping_review_needed"
    COMPILED_PREVIEW_READY = "compiled_preview_ready"
    PARTIALLY_READY = "partially_ready"
    RUN_READY = "run_ready"
    RUN_IN_PROGRESS = "run_in_progress"
    COMPLETED = "completed"
    RECOVERY_REQUIRED = "recovery_required"


# #endregion ReadinessState


# #region RecommendedAction [C:1] [TYPE Class]
# @BRIEF Next-action guidance derived from the current readiness state.
class RecommendedAction(str, enum.Enum):
    IMPORT_FROM_SUPERSET = "import_from_superset"
    REVIEW_DOCUMENTATION = "review_documentation"
    APPLY_SEMANTIC_SOURCE = "apply_semantic_source"
    START_CLARIFICATION = "start_clarification"
    ANSWER_NEXT_QUESTION = "answer_next_question"
    APPROVE_MAPPING = "approve_mapping"
    GENERATE_SQL_PREVIEW = "generate_sql_preview"
    COMPLETE_REQUIRED_VALUES = "complete_required_values"
    LAUNCH_DATASET = "launch_dataset"
    RESUME_SESSION = "resume_session"
    EXPORT_OUTPUTS = "export_outputs"


# #endregion RecommendedAction


# #region SessionCollaboratorRole [C:1] [TYPE Class]
# @BRIEF RBAC role for session collaborators.
class SessionCollaboratorRole(str, enum.Enum):
    VIEWER = "viewer"
    REVIEWER = "reviewer"
    APPROVER = "approver"


# #endregion SessionCollaboratorRole


# #region BusinessSummarySource [C:1] [TYPE Class]
# @BRIEF Provenance of the dataset business summary text.
class BusinessSummarySource(str, enum.Enum):
    CONFIRMED = "confirmed"
    IMPORTED = "imported"
    INFERRED = "inferred"
    AI_DRAFT = "ai_draft"
    MANUAL_OVERRIDE = "manual_override"


# #endregion BusinessSummarySource


# #region ConfidenceState [C:1] [TYPE Class]
# @BRIEF Confidence level for dataset profile completeness.
class ConfidenceState(str, enum.Enum):
    CONFIRMED = "confirmed"
    MOSTLY_CONFIRMED = "mostly_confirmed"
    MIXED = "mixed"
    LOW_CONFIDENCE = "low_confidence"
    UNRESOLVED = "unresolved"


# #endregion ConfidenceState


# #region FindingArea [C:1] [TYPE Class]
# @BRIEF Domain area classification for validation findings.
class FindingArea(str, enum.Enum):
    SOURCE_INTAKE = "source_intake"
    DATASET_PROFILE = "dataset_profile"
    SEMANTIC_ENRICHMENT = "semantic_enrichment"
    CLARIFICATION = "clarification"
    FILTER_RECOVERY = "filter_recovery"
    TEMPLATE_MAPPING = "template_mapping"
    COMPILED_PREVIEW = "compiled_preview"
    LAUNCH = "launch"
    AUDIT = "audit"


# #endregion FindingArea


# #region FindingSeverity [C:1] [TYPE Class]
# @BRIEF Severity classification for validation findings.
class FindingSeverity(str, enum.Enum):
    BLOCKING = "blocking"
    WARNING = "warning"
    INFORMATIONAL = "informational"


# #endregion FindingSeverity


# #region ResolutionState [C:1] [TYPE Class]
# @BRIEF Resolution status for validation findings and clarification items.
class ResolutionState(str, enum.Enum):
    OPEN = "open"
    RESOLVED = "resolved"
    APPROVED = "approved"
    SKIPPED = "skipped"
    DEFERRED = "deferred"
    EXPERT_REVIEW = "expert_review"


# #endregion ResolutionState


# #region SemanticSourceType [C:1] [TYPE Class]
# @BRIEF Classification of semantic enrichment source origins.
class SemanticSourceType(str, enum.Enum):
    UPLOADED_FILE = "uploaded_file"
    CONNECTED_DICTIONARY = "connected_dictionary"
    REFERENCE_DATASET = "reference_dataset"
    NEIGHBOR_DATASET = "neighbor_dataset"
    AI_GENERATED = "ai_generated"


# #endregion SemanticSourceType


# #region TrustLevel [C:1] [TYPE Class]
# @BRIEF Trust classification for semantic source reliability.
class TrustLevel(str, enum.Enum):
    TRUSTED = "trusted"
    RECOMMENDED = "recommended"
    CANDIDATE = "candidate"
    GENERATED = "generated"


# #endregion TrustLevel


# #region SemanticSourceStatus [C:1] [TYPE Class]
# @BRIEF Lifecycle status for semantic source application.
class SemanticSourceStatus(str, enum.Enum):
    AVAILABLE = "available"
    SELECTED = "selected"
    APPLIED = "applied"
    REJECTED = "rejected"
    PARTIAL = "partial"
    FAILED = "failed"


# #endregion SemanticSourceStatus


# #region FieldKind [C:1] [TYPE Class]
# @BRIEF Kind classification for semantic field entries.
class FieldKind(str, enum.Enum):
    COLUMN = "column"
    METRIC = "metric"
    FILTER_DIMENSION = "filter_dimension"
    PARAMETER = "parameter"


# #endregion FieldKind


# #region FieldProvenance [C:1] [TYPE Class]
# @BRIEF Provenance tracking for semantic field value origin.
class FieldProvenance(str, enum.Enum):
    DICTIONARY_EXACT = "dictionary_exact"
    REFERENCE_IMPORTED = "reference_imported"
    FUZZY_INFERRED = "fuzzy_inferred"
    AI_GENERATED = "ai_generated"
    MANUAL_OVERRIDE = "manual_override"
    UNRESOLVED = "unresolved"


# #endregion FieldProvenance


# #region CandidateMatchType [C:1] [TYPE Class]
# @BRIEF Match type classification for semantic candidates.
class CandidateMatchType(str, enum.Enum):
    EXACT = "exact"
    REFERENCE = "reference"
    FUZZY = "fuzzy"
    GENERATED = "generated"


# #endregion CandidateMatchType


# #region CandidateStatus [C:1] [TYPE Class]
# @BRIEF Lifecycle status for semantic candidate proposals.
class CandidateStatus(str, enum.Enum):
    PROPOSED = "proposed"
    ACCEPTED = "accepted"
    REJECTED = "rejected"
    SUPERSEDED = "superseded"


# #endregion CandidateStatus


# #region FilterSource [C:1] [TYPE Class]
# @BRIEF Origin classification for imported filters.
class FilterSource(str, enum.Enum):
    SUPERSET_NATIVE = "superset_native"
    SUPERSET_URL = "superset_url"
    SUPERSET_PERMALINK = "superset_permalink"
    SUPERSET_NATIVE_FILTERS_KEY = "superset_native_filters_key"
    MANUAL = "manual"
    INFERRED = "inferred"


# #endregion FilterSource


# #region FilterConfidenceState [C:1] [TYPE Class]
# @BRIEF Confidence classification for imported filter values.
class FilterConfidenceState(str, enum.Enum):
    CONFIRMED = "confirmed"
    IMPORTED = "imported"
    INFERRED = "inferred"
    AI_DRAFT = "ai_draft"
    UNRESOLVED = "unresolved"


# #endregion FilterConfidenceState


# #region FilterRecoveryStatus [C:1] [TYPE Class]
# @BRIEF Recovery quality status for imported filters.
class FilterRecoveryStatus(str, enum.Enum):
    RECOVERED = "recovered"
    PARTIAL = "partial"
    MISSING = "missing"
    CONFLICTED = "conflicted"


# #endregion FilterRecoveryStatus


# #region VariableKind [C:1] [TYPE Class]
# @BRIEF Kind classification for template variables.
class VariableKind(str, enum.Enum):
    NATIVE_FILTER = "native_filter"
    PARAMETER = "parameter"
    DERIVED = "derived"
    UNKNOWN = "unknown"


# #endregion VariableKind


# #region MappingStatus [C:1] [TYPE Class]
# @BRIEF Lifecycle status for template variable mapping.
class MappingStatus(str, enum.Enum):
    UNMAPPED = "unmapped"
    PROPOSED = "proposed"
    APPROVED = "approved"
    OVERRIDDEN = "overridden"
    INVALID = "invalid"


# #endregion MappingStatus


# #region MappingMethod [C:1] [TYPE Class]
# @BRIEF Method classification for execution mapping creation.
class MappingMethod(str, enum.Enum):
    DIRECT_MATCH = "direct_match"
    HEURISTIC_MATCH = "heuristic_match"
    SEMANTIC_MATCH = "semantic_match"
    MANUAL_OVERRIDE = "manual_override"


# #endregion MappingMethod


# #region MappingWarningLevel [C:1] [TYPE Class]
# @BRIEF Warning severity for execution mapping quality indicators.
class MappingWarningLevel(str, enum.Enum):
    LOW = "low"
    MEDIUM = "medium"
    HIGH = "high"


# #endregion MappingWarningLevel


# #region ApprovalState [C:1] [TYPE Class]
# @BRIEF Approval lifecycle for execution mapping gate checks.
class ApprovalState(str, enum.Enum):
    PENDING = "pending"
    APPROVED = "approved"
    REJECTED = "rejected"
    NOT_REQUIRED = "not_required"


# #endregion ApprovalState


# #region ClarificationStatus [C:1] [TYPE Class]
# @BRIEF Lifecycle status for clarification sessions.
class ClarificationStatus(str, enum.Enum):
    PENDING = "pending"
    ACTIVE = "active"
    PAUSED = "paused"
    COMPLETED = "completed"
    CANCELLED = "cancelled"


# #endregion ClarificationStatus


# #region QuestionState [C:1] [TYPE Class]
# @BRIEF State machine for individual clarification questions.
class QuestionState(str, enum.Enum):
    OPEN = "open"
    ANSWERED = "answered"
    SKIPPED = "skipped"
    EXPERT_REVIEW = "expert_review"
    SUPERSEDED = "superseded"


# #endregion QuestionState


# #region AnswerKind [C:1] [TYPE Class]
# @BRIEF Classification of clarification answer types.
class AnswerKind(str, enum.Enum):
    SELECTED = "selected"
    CUSTOM = "custom"
    SKIPPED = "skipped"
    EXPERT_REVIEW = "expert_review"


# #endregion AnswerKind


# #region PreviewStatus [C:1] [TYPE Class]
# @BRIEF Lifecycle status for compiled SQL previews.
class PreviewStatus(str, enum.Enum):
    PENDING = "pending"
    READY = "ready"
    FAILED = "failed"
    STALE = "stale"


# #endregion PreviewStatus


# #region LaunchStatus [C:1] [TYPE Class]
# @BRIEF Outcome status for dataset launch handoff.
class LaunchStatus(str, enum.Enum):
    STARTED = "started"
    SUCCESS = "success"
    FAILED = "failed"


# #endregion LaunchStatus


# #region ArtifactType [C:1] [TYPE Class]
# @BRIEF Type classification for export artifacts.
class ArtifactType(str, enum.Enum):
    DOCUMENTATION = "documentation"
    VALIDATION_REPORT = "validation_report"
    RUN_SUMMARY = "run_summary"


# #endregion ArtifactType


# #region ArtifactFormat [C:1] [TYPE Class]
# @BRIEF Format classification for export artifact output.
class ArtifactFormat(str, enum.Enum):
    JSON = "json"
    MARKDOWN = "markdown"
    CSV = "csv"
    PDF = "pdf"


# #endregion ArtifactFormat


# #endregion DatasetReviewEnums
