local d={}local D=script.Parent.Parent.Parent local P=game:GetService("\067\104\097\116")local q=D:WaitForChild("\067\108\105\101\110\116\067\104\097\116\077\111\100\117\108\101\115")local B=script.Parent local y=require(q:WaitForChild("\067\104\097\116\083\101\116\116\105\110\103\115"))local b=require(B:WaitForChild("\067\117\114\118\101\085\116\105\108"))local R={}R.__index=R local function m()local d=Instance.new("\070\114\097\109\101")d.Selectable=false d.Size=UDim2.new(1,0,1,0)d.BackgroundTransparency=1 local D=1 local P=1 local q=Instance.new("\070\114\097\109\101")q.Selectable=false q.Name="\066\097\099\107\103\114\111\117\110\100\070\114\097\109\101"q.Size=UDim2.new(1,-D*2,1,-P*2)q.Position=UDim2.new(0,D,0,P)q.BackgroundTransparency=1 q.Parent=d local B=Instance.new("\070\114\097\109\101")B.Selectable=false B.Name="\085\110\115\101\108\101\099\116\101\100\070\114\097\109\101"B.Size=UDim2.new(1,0,1,0)B.Position=UDim2.new(0,0,0,0)B.BorderSizePixel=0 B.BackgroundColor3=y.ChannelsTabUnselectedColor B.BackgroundTransparency=.6 B.Parent=q local b=Instance.new("\070\114\097\109\101")b.Selectable=false b.Name="\083\101\108\101\099\116\101\100\070\114\097\109\101"b.Size=UDim2.new(1,0,1,0)b.Position=UDim2.new(0,0,0,0)b.BorderSizePixel=0 b.BackgroundColor3=y.ChannelsTabSelectedColor b.BackgroundTransparency=1 b.Parent=q local R=Instance.new("\073\109\097\103\101\076\097\098\101\108")R.Selectable=false R.Name="\066\097\099\107\103\114\111\117\110\100\073\109\097\103\101"R.BackgroundTransparency=1 R.BorderSizePixel=0 R.Size=UDim2.new(1,0,1,0)R.Position=UDim2.new(0,0,0,0)R.ScaleType=Enum.ScaleType.Slice R.Parent=b R.BackgroundTransparency=-0.4 local m=1.2 R.BackgroundColor3=Color3.fromRGB(78*m,84*m,96*m)local l=2 local S=4 local r=Instance.new("\073\109\097\103\101\076\097\098\101\108")r.Selectable=false r.Size=UDim2.new(.5,-l,0,S)r.BackgroundTransparency=1 r.ScaleType=Enum.ScaleType.Slice r.SliceCenter=Rect.new(3,3,32,21)r.Parent=b local h=r:Clone()h.Parent=b r.Position=UDim2.new(0,l,1,-S)h.Position=UDim2.new(.5,0,1,-S)r.Image="\114\098\120\097\115\115\101\116\058\047\047\116\101\120\116\117\114\101\115\047\117\105\047\083\101\116\116\105\110\103\115\047\083\108\105\100\101\114\047\083\101\108\101\099\116\101\100\066\097\114\076\101\102\116\046\112\110\103"h.Image="\114\098\120\097\115\115\101\116\058\047\047\116\101\120\116\117\114\101\115\047\117\105\047\083\101\116\116\105\110\103\115\047\083\108\105\100\101\114\047\083\101\108\101\099\116\101\100\066\097\114\082\105\103\104\116\046\112\110\103"r.Name="\066\108\117\101\066\097\114\076\101\102\116"h.Name="\066\108\117\101\066\097\114\082\105\103\104\116"local E=Instance.new("\084\101\120\116\066\117\116\116\111\110")E.Selectable=y.GamepadNavigationEnabled E.Size=UDim2.new(1,0,1,0)E.Position=UDim2.new(0,0,0,0)E.BackgroundTransparency=1 E.Font=y.DefaultFont E.TextSize=y.ChatChannelsTabTextSize E.TextColor3=Color3.new(1,1,1)E.TextStrokeTransparency=.75 E.Parent=q local W=E:Clone()local s=E:Clone()W.Parent=B s.Parent=b W.Font=Enum.Font.SourceSans W.Active=false s.Active=false local G=Instance.new("\070\114\097\109\101")G.Selectable=false G.Size=UDim2.new(0,18,0,18)G.Position=UDim2.new(.8,-9,.5,-9)G.BackgroundTransparency=1 G.Parent=q local f=Instance.new("\073\109\097\103\101\076\097\098\101\108")f.Selectable=false f.Size=UDim2.new(1,0,1,0)f.BackgroundTransparency=1 f.Image="\114\098\120\097\115\115\101\116\058\047\047\116\101\120\116\117\114\101\115\047\117\105\047\067\104\097\116\047\077\101\115\115\097\103\101\067\111\117\110\116\101\114\046\112\110\103"f.Visible=false f.Parent=G local c=Instance.new("\084\101\120\116\076\097\098\101\108")c.Selectable=false c.BackgroundTransparency=1 c.Size=UDim2.new(0,13,0,9)c.Position=UDim2.new(.5,-7,.5,-7)c.Font=y.DefaultFont c.TextSize=14 c.TextColor3=Color3.new(1,1,1)c.Text=""c.Parent=f return d,E,W,s,f,B,b end function R.Destroy(d)d.GuiObject:Destroy()end function R.UpdateMessagePostedInChannel(D,d)if D.Active and d~=true then return end local P=D.UnreadMessageCount+1 D.UnreadMessageCount=P local q=D.NewMessageIcon q.Visible=true q.TextLabel.Text=P<100 and tostring(P)or"\033"local B=.15 local y=UDim2.new(0,0,-0.1,0)local b=q.Position local R=b+y local m=Enum.EasingDirection.Out local l=Enum.EasingStyle.Quad q.Position=UDim2.new(0,0,-0.15,0)q:TweenPosition(UDim2.new(0,0,0,0),m,l,B,true)end function R.SetActive(D,d)D.Active=d D.UnselectedFrame.Visible=not d D.SelectedFrame.Visible=d if d then D.UnreadMessageCount=0 D.NewMessageIcon.Visible=false D.NameTag.Font=Enum.Font.SourceSansBold else D.NameTag.Font=Enum.Font.SourceSans end end function R.SetTextSize(D,d)D.NameTag.TextSize=d end function R.FadeOutBackground(D,d)D.AnimParams.Background_TargetTransparency=1 D.AnimParams.Background_NormalizedExptValue=b:NormalizedDefaultExptValueInSeconds(d)end function R.FadeInBackground(D,d)D.AnimParams.Background_TargetTransparency=.6 D.AnimParams.Background_NormalizedExptValue=b:NormalizedDefaultExptValueInSeconds(d)end function R.FadeOutText(D,d)D.AnimParams.Text_TargetTransparency=1 D.AnimParams.Text_NormalizedExptValue=b:NormalizedDefaultExptValueInSeconds(d)D.AnimParams.TextStroke_TargetTransparency=1 D.AnimParams.TextStroke_NormalizedExptValue=b:NormalizedDefaultExptValueInSeconds(d)end function R.FadeInText(D,d)D.AnimParams.Text_TargetTransparency=0 D.AnimParams.Text_NormalizedExptValue=b:NormalizedDefaultExptValueInSeconds(d)D.AnimParams.TextStroke_TargetTransparency=.75 D.AnimParams.TextStroke_NormalizedExptValue=b:NormalizedDefaultExptValueInSeconds(d)end function R.AnimGuiObjects(d)d.UnselectedFrame.BackgroundTransparency=d.AnimParams.Background_CurrentTransparency d.SelectedFrame.BackgroundImage.BackgroundTransparency=d.AnimParams.Background_CurrentTransparency d.SelectedFrame.BlueBarLeft.ImageTransparency=d.AnimParams.Background_CurrentTransparency d.SelectedFrame.BlueBarRight.ImageTransparency=d.AnimParams.Background_CurrentTransparency d.NameTagNonSelect.TextTransparency=d.AnimParams.Background_CurrentTransparency d.NameTagNonSelect.TextStrokeTransparency=d.AnimParams.Background_CurrentTransparency d.NameTag.TextTransparency=d.AnimParams.Text_CurrentTransparency d.NewMessageIcon.ImageTransparency=d.AnimParams.Text_CurrentTransparency d.WhiteTextNewMessageNotification.TextTransparency=d.AnimParams.Text_CurrentTransparency d.NameTagSelect.TextTransparency=d.AnimParams.Text_CurrentTransparency d.NameTag.TextStrokeTransparency=d.AnimParams.TextStroke_CurrentTransparency d.WhiteTextNewMessageNotification.TextStrokeTransparency=d.AnimParams.TextStroke_CurrentTransparency d.NameTagSelect.TextStrokeTransparency=d.AnimParams.TextStroke_CurrentTransparency end function R.InitializeAnimParams(d)d.AnimParams.Text_TargetTransparency=0 d.AnimParams.Text_CurrentTransparency=0 d.AnimParams.Text_NormalizedExptValue=b:NormalizedDefaultExptValueInSeconds(0)d.AnimParams.TextStroke_TargetTransparency=.75 d.AnimParams.TextStroke_CurrentTransparency=.75 d.AnimParams.TextStroke_NormalizedExptValue=b:NormalizedDefaultExptValueInSeconds(0)d.AnimParams.Background_TargetTransparency=.6 d.AnimParams.Background_CurrentTransparency=.6 d.AnimParams.Background_NormalizedExptValue=b:NormalizedDefaultExptValueInSeconds(0)end function R.Update(D,d)D.AnimParams.Background_CurrentTransparency=b:Expt(D.AnimParams.Background_CurrentTransparency,D.AnimParams.Background_TargetTransparency,D.AnimParams.Background_NormalizedExptValue,d)D.AnimParams.Text_CurrentTransparency=b:Expt(D.AnimParams.Text_CurrentTransparency,D.AnimParams.Text_TargetTransparency,D.AnimParams.Text_NormalizedExptValue,d)D.AnimParams.TextStroke_CurrentTransparency=b:Expt(D.AnimParams.TextStroke_CurrentTransparency,D.AnimParams.TextStroke_TargetTransparency,D.AnimParams.TextStroke_NormalizedExptValue,d)D:AnimGuiObjects()end function d.new(d)local D=setmetatable({},R)local P,q,B,b,l,S,r=m()D.GuiObject=P D.NameTag=q D.NameTagNonSelect=B D.NameTagSelect=b D.NewMessageIcon=l D.UnselectedFrame=S D.SelectedFrame=r D.BlueBarLeft=r.BlueBarLeft D.BlueBarRight=r.BlueBarRight D.BackgroundImage=r.BackgroundImage D.WhiteTextNewMessageNotification=D.NewMessageIcon.TextLabel D.ChannelName=d D.UnreadMessageCount=0 D.Active=false D.GuiObject.Name="\070\114\097\109\101\095"..D.ChannelName if string.len(d)>y.MaxChannelNameLength then d=string.sub(d,1,y.MaxChannelNameLength-3).."\046\046\046"end D.NameTag.Text=""D.NameTagNonSelect.Text=d D.NameTagSelect.Text=d D.AnimParams={}D:InitializeAnimParams()D:AnimGuiObjects()D:SetActive(false)return D end return d
--!nonstrict
--	// FileName: ChannelsTab.lua
--	// Written by: Xsitsu
--	// Description: Channel tab button for selecting current channel and also displaying if currently selected.

local module = {}
--////////////////////////////// Include
--//////////////////////////////////////
local chatFolder = script.Parent.Parent.Parent

local Chat = game:GetService("Chat")
local clientChatModules = chatFolder:WaitForChild("ClientChatModules")
local modulesFolder = script.Parent
local ChatSettings = require(clientChatModules:WaitForChild("ChatSettings"))
local CurveUtil = require(modulesFolder:WaitForChild("CurveUtil"))

--////////////////////////////// Methods
--//////////////////////////////////////
local methods = {}
methods.__index = methods

local function CreateGuiObjects()
	local BaseFrame = Instance.new("Frame")
	BaseFrame.Selectable = false
	BaseFrame.Size = UDim2.new(1, 0, 1, 0)
	BaseFrame.BackgroundTransparency = 1

	local gapOffsetX = 1
	local gapOffsetY = 1

	local BackgroundFrame = Instance.new("Frame")
	BackgroundFrame.Selectable = false
	BackgroundFrame.Name = "BackgroundFrame"
	BackgroundFrame.Size = UDim2.new(1, -gapOffsetX * 2, 1, -gapOffsetY * 2)
	BackgroundFrame.Position = UDim2.new(0, gapOffsetX, 0, gapOffsetY)
	BackgroundFrame.BackgroundTransparency = 1
	BackgroundFrame.Parent = BaseFrame

	local UnselectedFrame = Instance.new("Frame")
	UnselectedFrame.Selectable = false
	UnselectedFrame.Name = "UnselectedFrame"
	UnselectedFrame.Size = UDim2.new(1, 0, 1, 0)
	UnselectedFrame.Position = UDim2.new(0, 0, 0, 0)
	UnselectedFrame.BorderSizePixel = 0
	UnselectedFrame.BackgroundColor3 = ChatSettings.ChannelsTabUnselectedColor
	UnselectedFrame.BackgroundTransparency = 0.6
	UnselectedFrame.Parent = BackgroundFrame

	local SelectedFrame = Instance.new("Frame")
	SelectedFrame.Selectable = false
	SelectedFrame.Name = "SelectedFrame"
	SelectedFrame.Size = UDim2.new(1, 0, 1, 0)
	SelectedFrame.Position = UDim2.new(0, 0, 0, 0)
	SelectedFrame.BorderSizePixel = 0
	SelectedFrame.BackgroundColor3 = ChatSettings.ChannelsTabSelectedColor
	SelectedFrame.BackgroundTransparency = 1
	SelectedFrame.Parent = BackgroundFrame

	local SelectedFrameBackgroundImage = Instance.new("ImageLabel")
	SelectedFrameBackgroundImage.Selectable = false
	SelectedFrameBackgroundImage.Name = "BackgroundImage"
	SelectedFrameBackgroundImage.BackgroundTransparency = 1
	SelectedFrameBackgroundImage.BorderSizePixel = 0
	SelectedFrameBackgroundImage.Size = UDim2.new(1, 0, 1, 0)
	SelectedFrameBackgroundImage.Position = UDim2.new(0, 0, 0, 0)
	SelectedFrameBackgroundImage.ScaleType = Enum.ScaleType.Slice
	SelectedFrameBackgroundImage.Parent = SelectedFrame

	SelectedFrameBackgroundImage.BackgroundTransparency = 0.6 - 1
	local rate = 1.2 * 1
	SelectedFrameBackgroundImage.BackgroundColor3 = Color3.fromRGB(78 * rate, 84 * rate, 96 * rate)

	local borderXOffset = 2
	local blueBarYSize = 4
	local BlueBarLeft = Instance.new("ImageLabel")
	BlueBarLeft.Selectable = false
	BlueBarLeft.Size = UDim2.new(0.5, -borderXOffset, 0, blueBarYSize)
	BlueBarLeft.BackgroundTransparency = 1
	BlueBarLeft.ScaleType = Enum.ScaleType.Slice
	BlueBarLeft.SliceCenter = Rect.new(3, 3, 32, 21)
	BlueBarLeft.Parent = SelectedFrame

	local BlueBarRight = BlueBarLeft:Clone()
	BlueBarRight.Parent = SelectedFrame

	BlueBarLeft.Position = UDim2.new(0, borderXOffset, 1, -blueBarYSize)
	BlueBarRight.Position = UDim2.new(0.5, 0, 1, -blueBarYSize)
	BlueBarLeft.Image = "rbxasset://textures/ui/Settings/Slider/SelectedBarLeft.png"
	BlueBarRight.Image = "rbxasset://textures/ui/Settings/Slider/SelectedBarRight.png"

	BlueBarLeft.Name = "BlueBarLeft"
	BlueBarRight.Name = "BlueBarRight"

	local NameTag = Instance.new("TextButton")
	NameTag.Selectable = ChatSettings.GamepadNavigationEnabled
	NameTag.Size = UDim2.new(1, 0, 1, 0)
	NameTag.Position = UDim2.new(0, 0, 0, 0)
	NameTag.BackgroundTransparency = 1
	NameTag.Font = ChatSettings.DefaultFont
	NameTag.TextSize = ChatSettings.ChatChannelsTabTextSize
	NameTag.TextColor3 = Color3.new(1, 1, 1)
	NameTag.TextStrokeTransparency = 0.75
	NameTag.Parent = BackgroundFrame

	local NameTagNonSelect = NameTag:Clone()
	local NameTagSelect = NameTag:Clone()
	NameTagNonSelect.Parent = UnselectedFrame
	NameTagSelect.Parent = SelectedFrame
	NameTagNonSelect.Font = Enum.Font.SourceSans
	NameTagNonSelect.Active = false
	NameTagSelect.Active = false

	local NewMessageIconFrame = Instance.new("Frame")
	NewMessageIconFrame.Selectable = false
	NewMessageIconFrame.Size = UDim2.new(0, 18, 0, 18)
	NewMessageIconFrame.Position = UDim2.new(0.8, -9, 0.5, -9)
	NewMessageIconFrame.BackgroundTransparency = 1
	NewMessageIconFrame.Parent = BackgroundFrame

	local NewMessageIcon = Instance.new("ImageLabel")
	NewMessageIcon.Selectable = false
	NewMessageIcon.Size = UDim2.new(1, 0, 1, 0)
	NewMessageIcon.BackgroundTransparency = 1
	NewMessageIcon.Image = "rbxasset://textures/ui/Chat/MessageCounter.png"
	NewMessageIcon.Visible = false
	NewMessageIcon.Parent = NewMessageIconFrame

	local NewMessageIconText = Instance.new("TextLabel")
	NewMessageIconText.Selectable = false
	NewMessageIconText.BackgroundTransparency = 1
	NewMessageIconText.Size = UDim2.new(0, 13, 0, 9)
	NewMessageIconText.Position = UDim2.new(0.5, -7, 0.5, -7)
	NewMessageIconText.Font = ChatSettings.DefaultFont
	NewMessageIconText.TextSize = 14
	NewMessageIconText.TextColor3 = Color3.new(1, 1, 1)
	NewMessageIconText.Text = ""
	NewMessageIconText.Parent = NewMessageIcon

	return BaseFrame, NameTag, NameTagNonSelect, NameTagSelect, NewMessageIcon, UnselectedFrame, SelectedFrame
end

function methods:Destroy()
	self.GuiObject:Destroy()
end

function methods:UpdateMessagePostedInChannel(ignoreActive)
	if self.Active and (ignoreActive ~= true) then
		return
	end

	local count = self.UnreadMessageCount + 1
	self.UnreadMessageCount = count

	local label = self.NewMessageIcon
	label.Visible = true
	label.TextLabel.Text = (count < 100) and tostring(count) or "!"

	local tweenTime = 0.15
	local tweenPosOffset = UDim2.new(0, 0, -0.1, 0)

	local curPos = label.Position
	local outPos = curPos + tweenPosOffset
	local easingDirection = Enum.EasingDirection.Out
	local easingStyle = Enum.EasingStyle.Quad

	label.Position = UDim2.new(0, 0, -0.15, 0)
	label:TweenPosition(UDim2.new(0, 0, 0, 0), easingDirection, easingStyle, tweenTime, true)
end

function methods:SetActive(active)
	self.Active = active
	self.UnselectedFrame.Visible = not active
	self.SelectedFrame.Visible = active

	if active then
		self.UnreadMessageCount = 0
		self.NewMessageIcon.Visible = false

		self.NameTag.Font = Enum.Font.SourceSansBold
	else
		self.NameTag.Font = Enum.Font.SourceSans
	end
end

function methods:SetTextSize(textSize)
	self.NameTag.TextSize = textSize
end

function methods:FadeOutBackground(duration)
	self.AnimParams.Background_TargetTransparency = 1
	self.AnimParams.Background_NormalizedExptValue = CurveUtil:NormalizedDefaultExptValueInSeconds(duration)
end

function methods:FadeInBackground(duration)
	self.AnimParams.Background_TargetTransparency = 0.6
	self.AnimParams.Background_NormalizedExptValue = CurveUtil:NormalizedDefaultExptValueInSeconds(duration)
end

function methods:FadeOutText(duration)
	self.AnimParams.Text_TargetTransparency = 1
	self.AnimParams.Text_NormalizedExptValue = CurveUtil:NormalizedDefaultExptValueInSeconds(duration)
	self.AnimParams.TextStroke_TargetTransparency = 1
	self.AnimParams.TextStroke_NormalizedExptValue = CurveUtil:NormalizedDefaultExptValueInSeconds(duration)
end

function methods:FadeInText(duration)
	self.AnimParams.Text_TargetTransparency = 0
	self.AnimParams.Text_NormalizedExptValue = CurveUtil:NormalizedDefaultExptValueInSeconds(duration)
	self.AnimParams.TextStroke_TargetTransparency = 0.75
	self.AnimParams.TextStroke_NormalizedExptValue = CurveUtil:NormalizedDefaultExptValueInSeconds(duration)
end

function methods:AnimGuiObjects()
	self.UnselectedFrame.BackgroundTransparency = self.AnimParams.Background_CurrentTransparency
	self.SelectedFrame.BackgroundImage.BackgroundTransparency = self.AnimParams.Background_CurrentTransparency
	self.SelectedFrame.BlueBarLeft.ImageTransparency = self.AnimParams.Background_CurrentTransparency
	self.SelectedFrame.BlueBarRight.ImageTransparency = self.AnimParams.Background_CurrentTransparency
	self.NameTagNonSelect.TextTransparency = self.AnimParams.Background_CurrentTransparency
	self.NameTagNonSelect.TextStrokeTransparency = self.AnimParams.Background_CurrentTransparency

	self.NameTag.TextTransparency = self.AnimParams.Text_CurrentTransparency
	self.NewMessageIcon.ImageTransparency = self.AnimParams.Text_CurrentTransparency
	self.WhiteTextNewMessageNotification.TextTransparency = self.AnimParams.Text_CurrentTransparency
	self.NameTagSelect.TextTransparency = self.AnimParams.Text_CurrentTransparency

	self.NameTag.TextStrokeTransparency = self.AnimParams.TextStroke_CurrentTransparency
	self.WhiteTextNewMessageNotification.TextStrokeTransparency = self.AnimParams.TextStroke_CurrentTransparency
	self.NameTagSelect.TextStrokeTransparency = self.AnimParams.TextStroke_CurrentTransparency
end

function methods:InitializeAnimParams()
	self.AnimParams.Text_TargetTransparency = 0
	self.AnimParams.Text_CurrentTransparency = 0
	self.AnimParams.Text_NormalizedExptValue = CurveUtil:NormalizedDefaultExptValueInSeconds(0)

	self.AnimParams.TextStroke_TargetTransparency = 0.75
	self.AnimParams.TextStroke_CurrentTransparency = 0.75
	self.AnimParams.TextStroke_NormalizedExptValue = CurveUtil:NormalizedDefaultExptValueInSeconds(0)

	self.AnimParams.Background_TargetTransparency = 0.6
	self.AnimParams.Background_CurrentTransparency = 0.6
	self.AnimParams.Background_NormalizedExptValue = CurveUtil:NormalizedDefaultExptValueInSeconds(0)
end

function methods:Update(dtScale)
	self.AnimParams.Background_CurrentTransparency = CurveUtil:Expt(
		self.AnimParams.Background_CurrentTransparency,
		self.AnimParams.Background_TargetTransparency,
		self.AnimParams.Background_NormalizedExptValue,
		dtScale
	)
	self.AnimParams.Text_CurrentTransparency = CurveUtil:Expt(
		self.AnimParams.Text_CurrentTransparency,
		self.AnimParams.Text_TargetTransparency,
		self.AnimParams.Text_NormalizedExptValue,
		dtScale
	)
	self.AnimParams.TextStroke_CurrentTransparency = CurveUtil:Expt(
		self.AnimParams.TextStroke_CurrentTransparency,
		self.AnimParams.TextStroke_TargetTransparency,
		self.AnimParams.TextStroke_NormalizedExptValue,
		dtScale
	)

	self:AnimGuiObjects()
end

--///////////////////////// Constructors
--//////////////////////////////////////

function module.new(channelName)
	local obj = setmetatable({}, methods)

	local BaseFrame, NameTag, NameTagNonSelect, NameTagSelect, NewMessageIcon, UnselectedFrame, SelectedFrame =
		CreateGuiObjects()
	obj.GuiObject = BaseFrame
	obj.NameTag = NameTag
	obj.NameTagNonSelect = NameTagNonSelect
	obj.NameTagSelect = NameTagSelect
	obj.NewMessageIcon = NewMessageIcon
	obj.UnselectedFrame = UnselectedFrame
	obj.SelectedFrame = SelectedFrame

	obj.BlueBarLeft = SelectedFrame.BlueBarLeft
	obj.BlueBarRight = SelectedFrame.BlueBarRight
	obj.BackgroundImage = SelectedFrame.BackgroundImage
	obj.WhiteTextNewMessageNotification = obj.NewMessageIcon.TextLabel

	obj.ChannelName = channelName
	obj.UnreadMessageCount = 0
	obj.Active = false

	obj.GuiObject.Name = "Frame_" .. obj.ChannelName

	if string.len(channelName) > ChatSettings.MaxChannelNameLength then
		channelName = string.sub(channelName, 1, ChatSettings.MaxChannelNameLength - 3) .. "..."
	end

	--obj.NameTag.Text = channelName

	obj.NameTag.Text = ""
	obj.NameTagNonSelect.Text = channelName
	obj.NameTagSelect.Text = channelName

	obj.AnimParams = {}

	obj:InitializeAnimParams()
	obj:AnimGuiObjects()
	obj:SetActive(false)

	return obj
end

return module
