local function d(d)d.textBox.FocusLost:connect(function(M)if d.mainParent.Name~="\067\109\100\066\097\114"or d.specificArg then if d.suggestionDisplayed>0 then selectSuggestion(d,d.specificArg)end else if d.suggestionDisplayed>0 and(not forceExecute and main.device~="\077\111\098\105\108\101")then selectSuggestion(d)elseif M then if forceExecute then selectSuggestion(d)end module:CloseCmdBar()if#d.textBox.Text>1 then local M=d.textBox.Text local b=string.sub(M,1,1)if b~=main.settings.UniversalPrefix and b~=main.pdata.Prefix then M=main.pdata.Prefix..M end local f=string.sub(M,-1)if f==" "then M=string.sub(M,1,-1)end main.signals.RequestCommand:InvokeServer(M)end end end end)end

local function setupEnterPress(props)
	props.textBox.FocusLost:connect(function(enter)
		if props.mainParent.Name ~= "CmdBar" or props.specificArg then
			if props.suggestionDisplayed > 0 then
				selectSuggestion(props, props.specificArg)
			end
		else
			if props.suggestionDisplayed > 0 and not forceExecute and main.device ~= "Mobile" then
				selectSuggestion(props)
			elseif enter then
				if forceExecute then
					selectSuggestion(props)
					--wait()
				end
				module:CloseCmdBar()
				if #props.textBox.Text > 1 then
					local commandToRequest = props.textBox.Text
					local firstChar = string.sub(commandToRequest,1,1)
					if firstChar ~= main.settings.UniversalPrefix and firstChar ~= main.pdata.Prefix then
						commandToRequest = main.pdata.Prefix..commandToRequest
					end
					local endChar = string.sub(commandToRequest,-1)
					if endChar == " " then
						commandToRequest = string.sub(commandToRequest,1,-1)
					end
					main.signals.RequestCommand:InvokeServer(commandToRequest)
				end
			end
		end
	end)
end
