function module.new(Y)local Q=setmetatable({},methods)local a,J,h,F,d,P,H=CreateGuiObjects()Q.GuiObject=a Q.NameTag=J Q.NameTagNonSelect=h Q.NameTagSelect=F Q.NewMessageIcon=d Q.UnselectedFrame=P Q.SelectedFrame=H Q.BlueBarLeft=H.BlueBarLeft Q.BlueBarRight=H.BlueBarRight Q.BackgroundImage=H.BackgroundImage Q.WhiteTextNewMessageNotification=Q.NewMessageIcon.TextLabel Q.ChannelName=Y Q.UnreadMessageCount=0 Q.Active=false Q.GuiObject.Name="\070\114\097\109\101\095"..Q.ChannelName if string.len(Y)>ChatSettings.MaxChannelNameLength then Y=string.sub(Y,1,ChatSettings.MaxChannelNameLength-3).."\046\046\046"end Q.NameTag.Text=""Q.NameTagNonSelect.Text=Y Q.NameTagSelect.Text=Y Q.AnimParams={}Q:InitializeAnimParams()Q:AnimGuiObjects()Q:SetActive(false)return Q end return module


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
