-- Compiled with roblox-ts v1.2.7 local TS = _G[script] local createReducer = TS.import(script, TS.getModule(script, "@rbxts", "rodux").src).createReducer local ZirconLogLevel = TS.import(script, script.Parent.Parent.Parent.Parent, "Types").ZirconLogLevel local DEFAULT_FILTER = { [ZirconLogLevel.Info] = true, [ZirconLogLevel.Warning] = true, [ZirconLogLevel.Error] = true, [ZirconLogLevel.Wtf] = true, } local INITIAL_STATE = { visible = false, autoFocusTextBox = true, executionEnabled = false, hotkeyEnabled = false, canExecuteLocalScripts = false, logDetailsPaneEnabled = false, showTagsInOutput = true, output = {}, history = {}, bindingKeys = {}, filter = { Levels = { [ZirconLogLevel.Info] = true, [ZirconLogLevel.Warning] = true, [ZirconLogLevel.Error] = true, [ZirconLogLevel.Wtf] = true, }, }, } local actions = { SetConsoleVisible = function(state, _param) local visible = _param.visible local _object = {} for _k, _v in pairs(state) do _object[_k] = _v end _object.visible = visible return _object end, SetConsoleConfiguration = function(state, _param) local executionEnabled = _param.executionEnabled local hotkeyEnabled = _param.hotkeyEnabled local showTagsInOutput = _param.showTagsInOutput local logDetailsPaneEnabled = _param.logDetailsPaneEnabled local autoFocusTextBox = _param.autoFocusTextBox local bindKeys = _param.bindKeys local _object = {} for _k, _v in pairs(state) do _object[_k] = _v end _object.executionEnabled = executionEnabled _object.hotkeyEnabled = hotkeyEnabled _object.showTagsInOutput = showTagsInOutput _object.logDetailsPaneEnabled = logDetailsPaneEnabled _object.autoFocusTextBox = autoFocusTextBox _object.bindingKeys = bindKeys return _object end, SetClientExecutionEnabled = function(state, _param) local enabled = _param.enabled local _object = {} for _k, _v in pairs(state) do _object[_k] = _v end _object.canExecuteLocalScripts = enabled return _object end, AddOutput = function(state, _param) local message = _param.message local _object = {} for _k, _v in pairs(state) do _object[_k] = _v end local _left = "output" local _array = {} local _length = #_array local _array_1 = state.output local _Length = #_array_1 table.move(_array_1, 1, _Length, _length + 1, _array) _length += _Length _array[_length + 1] = message _object[_left] = _array return _object end, AddHistory = function(state, _param) local message = _param.message local _object = {} for _k, _v in pairs(state) do _object[_k] = _v end local _left = "history" local _array = {} local _length = #_array local _array_1 = state.history local _Length = #_array_1 table.move(_array_1, 1, _Length, _length + 1, _array) _length += _Length _array[_length + 1] = message _object[_left] = _array return _object end, SetFilter = function(state, _param) local filter = _param.filter local _object = {} for _k, _v in pairs(state) do _object[_k] = _v end _object.filter = filter return _object end, UpdateFilter = function(state, options) local _object = {} for _k, _v in pairs(state) do _object[_k] = _v end local _left = "filter" local _object_1 = {} for _k, _v in pairs(state.filter) do _object_1[_k] = _v end for _k, _v in pairs(options) do _object_1[_k] = _v end _object[_left] = _object_1 return _object end, RemoveFilter = function(state, _param) local filter = _param.filter local _object = {} for _k, _v in pairs(state) do _object[_k] = _v end local _left = "filter" local _object_1 = {} for _k, _v in pairs(state.filter) do _object_1[_k] = _v end _object_1[filter] = nil _object[_left] = _object_1 return _object end, } local consoleReducer = createReducer(INITIAL_STATE, actions) local default = consoleReducer return { DEFAULT_FILTER = DEFAULT_FILTER, default = default, }