local k={}local H=require(script.Parent.errorIDs)local function A(k,...)local A=H[k]if A then return string.format(A,...)else return string.format(H.unknownError,k or"\078\047\065")end end function k.logError(k,...)local H=A(k,...)local U=string.format("\091\067\111\110\115\116\114\117\099\116 - \069\114\114\111\114\093 \037\115 \040\101\114\114\111\114\073\068\058 \037\115\041",H,k or"\078\047\065")error(U,0)end function k.logWarning(k,...)local H=A(k,...)local U=string.format("\091\067\111\110\115\116\114\117\099\116 - \087\097\114\110\105\110\103\093 \037\115 \040\101\114\114\111\114\073\068\058 \037\115\041",H,k or"\078\047\065")warn(U,0)end return k


local Logger = {}

local errorIDs = require(script.Parent.errorIDs)

local function formatErrorMessage(errorID, ...)
    local errorMessageTemplate = errorIDs[errorID]

    if errorMessageTemplate then
        return string.format(errorMessageTemplate, ...)
    else
        return string.format(errorIDs.unknownError, errorID or "N/A")
    end
end

function Logger.logError(errorID, ...)
    local formattedMessage = formatErrorMessage(errorID, ...)
    local fullMessage = string.format("[Construct - Error] %s (errorID: %s)", formattedMessage, errorID or "N/A")
    error(fullMessage, 0)
end

function Logger.logWarning(errorID, ...)
    local formattedMessage = formatErrorMessage(errorID, ...)
    local fullMessage = string.format("[Construct - Warning] %s (errorID: %s)", formattedMessage, errorID or "N/A")
    warn(fullMessage, 0)
end

return Logger
