local _AddonName, _EchoRaidTools = ...

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

EchoRaidToolsConfig_EditBoxMixin = {}
function EchoRaidToolsConfig_EditBoxMixin:OnLoad()
    self.Enabled = true
end
function EchoRaidToolsConfig_EditBoxMixin:OnEnter()
    if self.Enabled and self.tooltip then
        GameTooltip:SetOwner(self, "ANCHOR_TOPLEFT")
        GameTooltip:SetFrameLevel(self:GetFrameLevel() + 2)
        GameTooltip:SetText(self.tooltip)
    end
end
function EchoRaidToolsConfig_EditBoxMixin:OnLeave()
    if self.tooltip then
        GameTooltip:Hide()
    end
end
function EchoRaidToolsConfig_EditBoxMixin:Enable()
    self.TopText:SetTextColor(1, 0.82, 0, 0.7)
    self:SetAlpha(1)
    --self.Button:Enable()
    self.Enabled = true
end
function EchoRaidToolsConfig_EditBoxMixin:Disable()
    self.TopText:SetTextColor(1, 0.82, 0, 0.3)
    self:SetAlpha(0.5)
    --self.Button:Disable()
    self.Enabled = false
end
function EchoRaidToolsConfig_EditBoxMixin:IsEnabled()
    return self.Enabled
end