"""
Shifu consts

This module contains constants for shifu.

Author: yfge
Date: 2025-08-07
"""

UNIT_TYPE_TRIAL = "trial"
UNIT_TYPE_NORMAL = "normal"

BLOCK_TYPE_CONTENT = "content"
BLOCK_TYPE_BREAK = "break"
BLOCK_TYPE_BUTTON = "button"
BLOCK_TYPE_INPUT = "input"
BLOCK_TYPE_OPTIONS = "options"
BLOCK_TYPE_GOTO = "goto"
BLOCK_TYPE_PAYMENT = "payment"
BLOCK_TYPE_LOGIN = "login"
BLOCK_TYPE_PHONE = "phone"
BLOCK_TYPE_CHECKCODE = "checkcode"


BLOCK_TYPE_CONTENT_VALUE = 301
BLOCK_TYPE_BUTTON_VALUE = 302
BLOCK_TYPE_INPUT_VALUE = 303
BLOCK_TYPE_OPTIONS_VALUE = 304
BLOCK_TYPE_GOTO_VALUE = 305
BLOCK_TYPE_PAYMENT_VALUE = 306
BLOCK_TYPE_LOGIN_VALUE = 307
BLOCK_TYPE_BREAK_VALUE = 308
BLOCK_TYPE_PHONE_VALUE = 309
BLOCK_TYPE_CHECKCODE_VALUE = 310

BLOCK_TYPE_MDCONTENT_VALUE = 311
BLOCK_TYPE_MDINTERACTION_VALUE = 312
BLOCK_TYPE_MDERRORMESSAGE_VALUE = 313
BLOCK_TYPE_MDASK_VALUE = 321


UNIT_TYPE_VALUE_TRIAL = 401
UNIT_TYPE_VALUE_NORMAL = 402

UNIT_TYPE_VALUES = {
    UNIT_TYPE_TRIAL: UNIT_TYPE_VALUE_TRIAL,
    UNIT_TYPE_NORMAL: UNIT_TYPE_VALUE_NORMAL,
}

UNIT_TYPE_VALUES_REVERSE = {v: k for k, v in UNIT_TYPE_VALUES.items()}


BLOCK_TYPE_VALUES = {
    BLOCK_TYPE_CONTENT: BLOCK_TYPE_CONTENT_VALUE,
    BLOCK_TYPE_BUTTON: BLOCK_TYPE_BUTTON_VALUE,
    BLOCK_TYPE_INPUT: BLOCK_TYPE_INPUT_VALUE,
    BLOCK_TYPE_OPTIONS: BLOCK_TYPE_OPTIONS_VALUE,
    BLOCK_TYPE_GOTO: BLOCK_TYPE_GOTO_VALUE,
    BLOCK_TYPE_PAYMENT: BLOCK_TYPE_PAYMENT_VALUE,
    BLOCK_TYPE_LOGIN: BLOCK_TYPE_LOGIN_VALUE,
    BLOCK_TYPE_BREAK: BLOCK_TYPE_BREAK_VALUE,
    BLOCK_TYPE_PHONE: BLOCK_TYPE_PHONE_VALUE,
    BLOCK_TYPE_CHECKCODE: BLOCK_TYPE_CHECKCODE_VALUE,
}

BLOCK_TYPE_VALUES_REVERSE = {v: k for k, v in BLOCK_TYPE_VALUES.items()}


ASK_MODE_DEFAULT = 5101
ASK_MODE_DISABLE = 5102
ASK_MODE_ENABLE = 5103


STATUS_DELETE = 1


SHIFU_EDIT_STATUS_HISTORY = 6101
SHIFU_EDIT_STATUS_DRAFT = 6102
