local e=game:GetService("\082\101\112\108\105\099\097\116\101\100\083\116\111\114\097\103\101")local V=e:WaitForChild("\114\097\100\105\111\083\104\097\114\101\100")local l=require(V:WaitForChild("\070\117\115\105\111\110"))local t,S,o,j=l.New,l.Children,l.Computed,l.OnEvent return function(e)return(t("\084\101\120\116\066\117\116\116\111\110"))({Name=e.Id;LayoutOrder=e.Id,Size=UDim2.fromScale(1,.9),BackgroundTransparency=1,AnchorPoint=Vector2.new(.5,0),Position=UDim2.fromScale(.5,0),Text=e.Text;FontFace=o(function()if e.activeChannel:get()==e.Id then return Font.new("\114\098\120\097\115\115\101\116\058\047\047\102\111\110\116\115\047\102\097\109\105\108\105\101\115\047\065\114\105\097\108\046\106\115\111\110",Enum.FontWeight.Bold,Enum.FontStyle.Normal)else return Font.new("\114\098\120\097\115\115\101\116\058\047\047\102\111\110\116\115\047\102\097\109\105\108\105\101\115\047\065\114\105\097\108\046\106\115\111\110",Enum.FontWeight.Regular,Enum.FontStyle.Normal)end end);TextScaled=true;TextColor3=Color3.fromRGB(255,255,255);TextXAlignment=Enum.TextXAlignment.Center,[j("\065\099\116\105\118\097\116\101\100")]=function()e.activeChannel:set(e.Id)end,[S]={Active=(t("\070\114\097\109\101"))({Name="\065\099\116\105\118\101";Size=UDim2.fromScale(.75,.075);BackgroundColor3=Color3.fromRGB(255,255,255);BorderSizePixel=0;AnchorPoint=Vector2.new(.5,1),Position=UDim2.fromScale(.5,1),ZIndex=0;Visible=o(function()return e.activeChannel:get()==e.Id end)})}})end
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local shared = ReplicatedStorage:WaitForChild("radioShared")
local Fusion = require(shared:WaitForChild("Fusion"))

local New, Children, Computed, OnEvent = Fusion.New, Fusion.Children, Fusion.Computed, Fusion.OnEvent

return function(props)
	return New("TextButton")({
		Name = props.Id,
		LayoutOrder = props.Id,
		Size = UDim2.fromScale(1, 0.9),
		BackgroundTransparency = 1,
		AnchorPoint = Vector2.new(0.5, 0),
		Position = UDim2.fromScale(0.5, 0),

		Text = props.Text,
		FontFace = Computed(function()
			if props.activeChannel:get() == props.Id then
				return Font.new("rbxasset://fonts/families/Arial.json", Enum.FontWeight.Bold, Enum.FontStyle.Normal)
			else
				return Font.new("rbxasset://fonts/families/Arial.json", Enum.FontWeight.Regular, Enum.FontStyle.Normal)
			end
		end),
		TextScaled = true,
		TextColor3 = Color3.fromRGB(255, 255, 255),
		TextXAlignment = Enum.TextXAlignment.Center,

		[OnEvent("Activated")] = function()
			props.activeChannel:set(props.Id)
		end,

		[Children] = {
			Active = New("Frame")({
				Name = "Active",
				Size = UDim2.fromScale(0.75, 0.075),
				BackgroundColor3 = Color3.fromRGB(255, 255, 255),
				BorderSizePixel = 0,
				AnchorPoint = Vector2.new(0.5, 1),
				Position = UDim2.fromScale(0.5, 1),
				ZIndex = 0,

				Visible = Computed(function()
					return props.activeChannel:get() == props.Id
				end),
			}),
		},
	})
end
