local T={}function T.new(T,O,a)local D=newproxy(true)local w=getmetatable(D)local v=tostring(a)local H={Name=T,Value=O;EnumType=a}function H.IsA(O,T)return v==T end w.__metatable="\084\104\101 \109\101\116\097\116\097\098\108\101 \105\115 \108\111\099\107\101\100"w.__tostring=function()return("\069\110\117\109\046\037\115\046\037\115"):format(v,T)end function w.__index(T,O)local a=H[O]if a then return a else error(("\037\115 \105\115 \110\111\116 \097 \118\097\108\105\100 \109\101\109\098\101\114 \111\102 \"\037\115\""):format(O,tostring(D)),2)end end function w.__newindex(T,O)error(O.." \099\097\110\110\111\116 \098\101 \097\115\115\105\103\110\101\100 \116\111",2)end return D end return T
--[=[
    @class EnumItem
    Mirror of Roblox's
    [EnumItem](https://developer.roblox.com/en-us/api-reference/datatype/EnumItem)
    DataType.
]=]
local EnumItem = {}

--[=[
    @within EnumItem
    @private
    @return EnumItem
    Creates a new EnumItem.
]=]
--[=[
    @within EnumItem
    @readonly
    @prop Name string
    The name of the EnumItem.
]=]
--[=[
    @within EnumItem
    @readonly
    @prop Value any
    The value of the EnumItem.
]=]
--[=[
    @within EnumItem
    @readonly
    @prop EnumType string
    The type of the EnumItem.
]=]
--[=[
    @within EnumItem
    @function IsA
    @param EnumType string
    @return boolean
    Returns if the EnumItem is of the given EnumType.
]=]
function EnumItem.new(name, value, type)
    local enumItem = newproxy(true)
    local meta = getmetatable(enumItem)

    local typeName = tostring(type)
    local props = {
        Name = name,
        Value = value,
        EnumType = type,
    }

    function props:IsA(enumType)
        return typeName == enumType
    end

    meta.__metatable = "The metatable is locked"
    meta.__tostring = function()
        return ("Enum.%s.%s"):format(typeName, name)
    end

    function meta.__index(_, i)
        local v = props[i]

        if v then
            return v
        else
            error(("%s is not a valid member of \"%s\""):format(i, tostring(enumItem)), 2)
        end
    end

    function meta.__newindex(_, i)
        error(i.. " cannot be assigned to", 2)
    end

    return enumItem
end

return EnumItem