local _AddonName, _EchoRaidTools = ...

EchoRaidTools_CheckButtonTemplateMixin = {}
function EchoRaidTools_CheckButtonTemplateMixin:OnEnter()
    if self.tooltip then
        GameTooltip:SetOwner(self, "ANCHOR_TOPLEFT")
        GameTooltip:SetFrameLevel(self:GetFrameLevel() + 2)
        GameTooltip:SetText(self.tooltip)
    end
end
function EchoRaidTools_CheckButtonTemplateMixin:OnLeave()
    if self.tooltip then
        GameTooltip:Hide()
    end
end
function EchoRaidTools_CheckButtonTemplateMixin:PreClick()
    PlaySound(84240)
end

EchoRaidToolsConfig_CheckButtonMixin = {}
function EchoRaidToolsConfig_CheckButtonMixin:OnLoad()
    self.Enabled = true
    self.CheckButton.tooltip = self.tooltip
end
function EchoRaidToolsConfig_CheckButtonMixin:Enable()
    self.TopText:SetTextColor(1, 0.82, 0, 0.7)
    self.CheckButton:Enable()
    self.Enabled = true
end
function EchoRaidToolsConfig_CheckButtonMixin:Disable()
    self.TopText:SetTextColor(1, 0.82, 0, 0.3)
    self.CheckButton:Disable()
    self.Enabled = false
end
function EchoRaidToolsConfig_CheckButtonMixin:IsEnabled()
    return self.Enabled
end