#pragma once

#include <cstdint>
#include <string>

namespace scar {

// Message types
enum class MessageType : uint8_t {
    // Authentication
    LOGIN_REQUEST = 0x01,
    LOGIN_RESPONSE = 0x02,
    LOGOUT = 0x03,
    
    // Chat
    TEXT_MESSAGE = 0x10,
    USER_LIST = 0x11,
    USER_STATUS = 0x12,
    
    // Media
    VIDEO_STREAM_START = 0x20,
    VIDEO_STREAM_DATA = 0x21,
    VIDEO_STREAM_STOP = 0x22,
    SCREEN_SHARE_START = 0x23,
    SCREEN_SHARE_DATA = 0x24,
    SCREEN_SHARE_STOP = 0x25,
    
    // System
    PING = 0xF0,
    PONG = 0xF1,
    ERROR = 0xFF
};

// User status
enum class UserStatus : uint8_t {
    OFFLINE = 0,
    ONLINE = 1,
    AWAY = 2,
    BUSY = 3
};

// Error codes
enum class ErrorCode : uint16_t {
    NONE = 0,
    AUTH_FAILED = 1000,
    INVALID_TOKEN = 1001,
    USER_NOT_FOUND = 1002,
    USERNAME_EXISTS = 1003,
    INVALID_MESSAGE = 2000,
    PERMISSION_DENIED = 3000,
    SERVER_ERROR = 9999
};

} // namespace scar
