local q=game:GetService("\082\101\112\108\105\099\097\116\101\100\083\116\111\114\097\103\101")local Q=q:WaitForChild("\077\111\100\117\108\101\115")local R=require(Q.src.utils.Logger)local j=((game:GetService("\083\116\097\114\116\101\114\080\108\097\121\101\114")):WaitForChild("\083\116\097\114\116\101\114\080\108\097\121\101\114\083\099\114\105\112\116\115")).clientSrc local E=require(j.Components.common.UICorner)local x=require(j.Components.common.Frame)local F=require(Q.Roact)local J=require(Q.RoactRodux)local S=require(j.Components.common.UIPadding)local k=require(j.Components.common.TextLabel)local i=require(j.Components.Timer)local g=F.createElement local X=F.PureComponent:extend("\082\111\111\109\067\108\111\099\107\083\099\114\101\101\110")function X.render(q)local Q=q.props local R=Q.countDownTime local j=g(k,{Size=UDim2.new(1,0,.5,0),TextScaled=true;TextSize=30;AnchorPoint=Vector2.new(.5,0);TextXAlignment=Enum.TextXAlignment.Center,TextYAlignment=Enum.TextYAlignment.Center;Text=Q.countDownText,TextColor3=Q.TextColor3,BackgroundTransparency=Q.BackgroundTransparency or.5,BackgroundColor3=Color3.fromRGB(255,255,255);BorderColor3=Color3.fromRGB(255,255,255)},{UICorner=g(E)})local F=R and g(i,{key=Q.countDownTime,increment=false;initialTime=Q.countDownTime,TextColor3=Q.TextColor3;Size=UDim2.new(1,0,.5,0),TextScaled=true;TextSize=30,AnchorPoint=Vector2.new(.5,0);TextXAlignment=Enum.TextXAlignment.Center,TextYAlignment=Enum.TextYAlignment.Center,BackgroundTransparency=Q.BackgroundTransparency or.5,BackgroundColor3=Color3.fromRGB(255,255,255);BorderColor3=Color3.fromRGB(255,255,255)},{UICorner=g(E)})return g(x,{Layout="\076\105\115\116",LayoutDirection="\086\101\114\116\105\099\097\108";HorizontalAlignment="\067\101\110\116\101\114";Padding=UDim.new(0,3);Size=UDim2.new(1,0,1,0);AnchorPoint=Vector2.new(0,0)},{text=j,time=F;UIPadding=g(S,{padding=10})})end local L=(J.connect(function(q,Q)local R=Q.roomId local j=q.rooms[R]return{countDownTime=j.countDownTime,countDownText=j.countDownTextOther and j.countDownTextOther or j.countDownText}end))(X)return L
local ReplicatedStorage = game:GetService('ReplicatedStorage')
local Modules = ReplicatedStorage:WaitForChild('Modules')
local logger = require(Modules.src.utils.Logger)
local clientSrc = game:GetService('StarterPlayer'):WaitForChild('StarterPlayerScripts').clientSrc

local UICorner = require(clientSrc.Components.common.UICorner)
local Frame = require(clientSrc.Components.common.Frame)
local Roact = require(Modules.Roact)
local RoactRodux = require(Modules.RoactRodux)
local UIPadding = require(clientSrc.Components.common.UIPadding)
local TextLabel = require(clientSrc.Components.common.TextLabel)
local Timer = require(clientSrc.Components.Timer)

local createElement = Roact.createElement
local RoomClockScreen = Roact.PureComponent:extend('RoomClockScreen')

function RoomClockScreen:render()
	local props = self.props
	local countDownTime = props.countDownTime

	local text = createElement(
		TextLabel,
		{
			Size = UDim2.new(1, 0, 0.5, 0),
			TextScaled = true,
			TextSize = 30,
			AnchorPoint = Vector2.new(0.5, 0),
			TextXAlignment = Enum.TextXAlignment.Center,
			TextYAlignment = Enum.TextYAlignment.Center,
			Text = props.countDownText,
			TextColor3 = props.TextColor3,
			BackgroundTransparency = props.BackgroundTransparency or 0.5,
			BackgroundColor3 = Color3.fromRGB(255, 255, 255),
			BorderColor3 = Color3.fromRGB(255, 255, 255),
		},
		{ UICorner = createElement(UICorner) }
	)

	local time = countDownTime and createElement(
		Timer,
		{
			key = props.countDownTime,
			increment = false,
			initialTime = props.countDownTime,
			TextColor3 = props.TextColor3,
			Size = UDim2.new(1, 0, 0.5, 0),
			TextScaled = true,
			TextSize = 30,
			AnchorPoint = Vector2.new(0.5, 0),
			TextXAlignment = Enum.TextXAlignment.Center,
			TextYAlignment = Enum.TextYAlignment.Center,
			BackgroundTransparency = props.BackgroundTransparency or 0.5,
			BackgroundColor3 = Color3.fromRGB(255, 255, 255),
			BorderColor3 = Color3.fromRGB(255, 255, 255),
		},
		{ UICorner = createElement(UICorner) }
	)

	return createElement(
		Frame,
		{
			Layout = 'List',
			LayoutDirection = 'Vertical',
			HorizontalAlignment = 'Center',
			Padding = UDim.new(0, 3),
			Size = UDim2.new(1, 0, 1, 0),
			AnchorPoint = Vector2.new(0, 0),
		},
		{
			text = text,
			time = time,
			UIPadding = createElement(UIPadding, { padding = 10 }),
		}
	)
end

local RoomClockScreenConnected = RoactRodux.connect(function(state, props)
	local roomId = props.roomId
	local room = state.rooms[roomId]

	return {
		countDownTime = room.countDownTime,
		countDownText = room.countDownTextOther and room.countDownTextOther or room.countDownText,
	}
end)(RoomClockScreen)

return RoomClockScreenConnected