local UIMainBLBtnBase = require("UI.LWMainUI.Component.UIMainBottom.LeftLayoutBtns.UIMainBLBtnBase")
local UIMainBLBtnSearch = BaseClass("UIMainBLBtnSearch", UIMainBLBtnBase)
local base = UIMainBLBtnBase
local OnAddMainBtnListener = function(self)
  base.OnAddMainBtnListener(self)
  self:AddUIListener(EventId.OnEnterCity, self.Refresh)
  self:AddUIListener(EventId.OnEnterWorld, self.Refresh)
end
local OnRemoveMainBtnListener = function(self)
  base.OnRemoveMainBtnListener(self)
  self:RemoveUIListener(EventId.OnEnterCity, self.Refresh)
  self:RemoveUIListener(EventId.OnEnterWorld, self.Refresh)
end
local OnClick = function(self)
  self.commonRedPoint:SetViewed()
  self.view.ctrl:OnClickSearchBtn()
end
local CheckEnable = function(self)
  local inWorld = SceneUtils.GetIsInWorld()
  local unlock = self:CheckUnlock()
  return unlock and inWorld
end
UIMainBLBtnSearch.OnClick = OnClick
UIMainBLBtnSearch.OnAddMainBtnListener = OnAddMainBtnListener
UIMainBLBtnSearch.OnRemoveMainBtnListener = OnRemoveMainBtnListener
UIMainBLBtnSearch.CheckEnable = CheckEnable
return UIMainBLBtnSearch
