-- Compiled with roblox-ts v3.0.0 local function isRecord(value) local _value = value return type(_value) == "table" end local function isFn(value) local _value = value return type(_value) == "function" end local function toHandlerTable(value) if not isRecord(value) then return nil end local out = {} for rawKey, candidate in pairs(value) do if not (type(rawKey) == "string") or not isFn(candidate) then continue end out[rawKey] = candidate end return if (next(out)) ~= nil then out else nil end local function mergeHandlerTables(tables) local out = {} for _, handlerTable in tables do if not handlerTable then continue end for rawKey, candidate in pairs(handlerTable) do if not (type(rawKey) == "string") or not isFn(candidate) then continue end local previous = out[rawKey] out[rawKey] = if previous ~= nil then function(...) local args = { ... } previous(unpack(args)) candidate(unpack(args)) end else candidate end end return if (next(out)) ~= nil then out else nil end local function mergeGuiProps(base, variant, user) local _condition = base if _condition == nil then _condition = {} end local _object = table.clone(_condition) setmetatable(_object, nil) local _condition_1 = variant if _condition_1 == nil then _condition_1 = {} end for _k, _v in _condition_1 do _object[_k] = _v end local _condition_2 = user if _condition_2 == nil then _condition_2 = {} end for _k, _v in _condition_2 do _object[_k] = _v end local merged = _object local _result = base if _result ~= nil then _result = _result.Event end local _exp = toHandlerTable(_result) local _result_1 = variant if _result_1 ~= nil then _result_1 = _result_1.Event end local _exp_1 = toHandlerTable(_result_1) local _result_2 = user if _result_2 ~= nil then _result_2 = _result_2.Event end local mergedEvent = mergeHandlerTables({ _exp, _exp_1, toHandlerTable(_result_2) }) if mergedEvent then merged.Event = mergedEvent end local _result_3 = base if _result_3 ~= nil then _result_3 = _result_3.Change end local _exp_2 = toHandlerTable(_result_3) local _result_4 = variant if _result_4 ~= nil then _result_4 = _result_4.Change end local _exp_3 = toHandlerTable(_result_4) local _result_5 = user if _result_5 ~= nil then _result_5 = _result_5.Change end local mergedChange = mergeHandlerTables({ _exp_2, _exp_3, toHandlerTable(_result_5) }) if mergedChange then merged.Change = mergedChange end return merged end return { mergeGuiProps = mergeGuiProps, }