local U=require("\046\047\099\111\110\115\111\108\101")local S={}setmetatable(S,{__index=function(S,Z)if _G.__DEV__ then U.warn("\065\116\116\101\109\112\116\101\100 \116\111 \097\099\099\101\115\115 \117\110\105\110\105\116\105\097\108\105\122\101\100 \115\116\097\116\101\046 \085\115\101 \115\101\116\083\116\097\116\101 \116\111 \105\110\105\116\105\097\108\105\122\101 \115\116\097\116\101")end return nil end,__newindex=function(S,Z)if _G.__DEV__ then U.error("\065\116\116\101\109\112\116\101\100 \116\111 \100\105\114\101\099\116\108\121 \109\117\116\097\116\101 \115\116\097\116\101\046 \085\115\101 \115\101\116\083\116\097\116\101 \116\111 \097\115\115\105\103\110 \110\101\119 \118\097\108\117\101\115 \116\111 \115\116\097\116\101\046")end return nil end;__tostring=function(U)return"\060\117\110\105\110\105\116\105\097\108\105\122\101\100 \099\111\109\112\111\110\101\110\116 \115\116\097\116\101\062"end,__metatable="\085\110\105\110\105\116\105\097\108\105\122\101\100\083\116\097\116\101"})return S
--[[
	* Copyright (c) Roblox Corporation. All rights reserved.
	* Licensed under the MIT License (the "License");
	* you may not use this file except in compliance with the License.
	* You may obtain a copy of the License at
	*
	*     https://opensource.org/licenses/MIT
	*
	* Unless required by applicable law or agreed to in writing, software
	* distributed under the License is distributed on an "AS IS" BASIS,
	* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
	* See the License for the specific language governing permissions and
	* limitations under the License.
]]
--!strict
local console = require("./console")

-- ROBLOX DEVIATION: Initialize state to a singleton that warns on access and errors on assignment
-- initial state singleton
local UninitializedState = {}

setmetatable(UninitializedState, {
	__index = function(table, key)
		if _G.__DEV__ then
			console.warn(
				"Attempted to access uninitialized state. Use setState to initialize state"
			)
		end
		return nil
	end,
	__newindex = function(table, key)
		if _G.__DEV__ then
			console.error(
				"Attempted to directly mutate state. Use setState to assign new values to state."
			)
		end
		return nil
	end,
	__tostring = function(self)
		return "<uninitialized component state>"
	end,
	__metatable = "UninitializedState",
})

return UninitializedState
