---@meta

error("DO NOT REQUIRE THIS FILE")

---UUID generator module
---Supports two types of UUIDs:
---1. Player UID (type=0): 49-bit format with channel, serverid, boottimes, and sequence
---2. Regular UUID (type>0): 64-bit format with flag, serverid, boottimes, type, and sequence
---@class uuid
local uuid = {}

---Initialize the UUID generator with global configuration
---Must be called before using any other functions
---@param channel integer @ Channel ID (1-255, 8 bits)
---@param serverid integer @ Server ID (1-4095, 12 bits)
---@param boottimes integer @ Boot times counter (1-1023, 10 bits)
---@usage
---uuid.init(1, 1001, 5) -- Initialize with channel=1, serverid=1001, boottimes=5
function uuid.init(channel, serverid, boottimes) end

---Generate a new UUID
---@param type integer? @ UUID type (0 for player UID, 1-511 for regular UUID, defaults to 0)
---@return integer @ The generated UUID
---@usage
---local player_uid = uuid.next(0) -- Generate player UID
---local item_uid = uuid.next(1)   -- Generate item UUID with type=1
---local default_uid = uuid.next() -- Generate player UID (type=0)
function uuid.next(type) end

---Get the type of a UUID
---@param uid integer @ The UUID to check
---@return integer @ The UUID type (0 for player UID, 1-511 for regular UUID)
---@usage
---local uid_type = uuid.type(some_uid)
---if uid_type == 0 then
---    print("This is a player UID")
---else
---    print("This is a regular UUID with type:", uid_type)
---end
function uuid.type(uid) end

---Get the server ID from a UUID
---@param uid integer @ The UUID to extract server ID from
---@return integer @ The server ID (1-4095)
---@usage
---local server_id = uuid.serverid(some_uid)
---print("This UUID was generated by server:", server_id)
function uuid.serverid(uid) end

---Check if a value is a valid UUID
---@param uid integer @ The value to check
---@return boolean @ true if the value is a valid UUID, false otherwise
---@usage
---if uuid.isuid(some_value) then
---    print("Valid UUID")
---else
---    print("Not a valid UUID")
---end
function uuid.isuid(uid) end

return uuid
