
PratGJN= Prat:NewModule("GroupJoinNoise")

function PratGJN:OnInitialize()
    self.db = Prat:AcquireDBNamespace("GroupJoinNoise")
    Prat:RegisterDefaults("GroupJoinNoise", "profile", {
        on = false,
    })
    Prat.Options.args.GroupJoinNoise = {
        name = "GroupJoinNoise",
        desc = "A module to remove the sound and delay caused by people joining/leaving your party/raid.",
        type = "group",
        args = {
             toggle = {
                name = "Toggle",
                desc = "Toggle the module on and off.",
                type = "toggle",
                order = 200,
                get = function() return self.db.profile.on end,
                set = function() self.db.profile.on = Prat:ToggleModuleActive("GroupJoinNoise") end
            }
        }
    }
end

function PratGJN:OnEnable()
    self:Hook("LFGParentFrameTab2_OnClick", true) 
end


--[[------------------------------------------------
	Core Functions
------------------------------------------------]]--


function PratGJN:LFGParentFrameTab2_OnClick()	
	if ( LFGParentFrame:IsShown() ) then		
		self.hooks.LFGParentFrameTab2_OnClick()
	end
end
