local L=require(script:WaitForChild("\083\099\111\112\101\079\117\116\084\111\111\108\116\105\112"))local w=require(script:WaitForChild("\083\099\111\112\101\076\111\099\107\084\111\111\108\116\105\112"))local s=require(script:WaitForChild("\083\099\111\112\101\073\110\084\111\111\108\116\105\112"))local F=require(script:WaitForChild("\065\108\116\084\111\111\108\116\105\112"))local function m(m)local H=nil if m.IsAltDown then if m.IsScopeParent then H=Roact.createElement(L,m)elseif m.IsScope and not m.IsScopeLocked then H=Roact.createElement(w,m)elseif m.IsScopable then H=Roact.createElement(s,m)end elseif m.DisplayAltHotkey then H=Roact.createElement(F,m)end return Roact.createFragment({Tooltip=H;Spacer=H and Roact.createElement("\070\114\097\109\101",{BackgroundTransparency=1;Size=UDim2.new(0,0,1,0);LayoutOrder=m.LayoutOrder and m.LayoutOrder-1 or 2})})end return m

local ScopeOutTooltip = require(script:WaitForChild 'ScopeOutTooltip')
local ScopeLockTooltip = require(script:WaitForChild 'ScopeLockTooltip')
local ScopeInTooltip = require(script:WaitForChild 'ScopeInTooltip')
local AltTooltip = require(script:WaitForChild 'AltTooltip')

local function HotkeyTooltip(props)
    local Tooltip = nil

    -- Select appropriate tooltip
    if props.IsAltDown then
        if props.IsScopeParent then
            Tooltip = Roact.createElement(ScopeOutTooltip, props)
        elseif props.IsScope and (not props.IsScopeLocked) then
            Tooltip = Roact.createElement(ScopeLockTooltip, props)
        elseif props.IsScopable then
            Tooltip = Roact.createElement(ScopeInTooltip, props)
        end
    elseif props.DisplayAltHotkey then
        Tooltip = Roact.createElement(AltTooltip, props)
    end

    -- Return tooltip with spacer
    return Roact.createFragment({
        Tooltip = Tooltip;
        Spacer = Tooltip and Roact.createElement('Frame', {
            BackgroundTransparency = 1;
            Size = UDim2.new(0, 0, 1, 0);
            LayoutOrder = props.LayoutOrder and (props.LayoutOrder - 1) or 2;
        });
    })
end

return HotkeyTooltip
