module Pages
  module SearchPage
    class << self

      attr_accessor :nav_search_button, :nav_search_text_area, :channels_filter, :top_channel_search_result,
                    :channel_thumbnail

      def initialize_android_search_page_variables
        # Via left nav
        @nav_search_button = page_helper.android_debug + '/search_item'

        # Search page
        @nav_search_text_area = 'android:id/search_src_text'
        @channels_filter = '//android.widget.LinearLayout[1]/android.widget.FrameLayout[1]/android.widget.LinearLayout[1]/android.widget.FrameLayout[1]/android.support.v4.widget.DrawerLayout[1]/android.widget.LinearLayout[1]/android.widget.FrameLayout[1]/android.widget.LinearLayout[1]/android.widget.FrameLayout[1]/android.widget.FrameLayout[1]/android.widget.LinearLayout[1]/android.widget.HorizontalScrollView[1]/android.widget.LinearLayout[1]/android.widget.TextView[2]'

        # Results
        @top_channel_search_result = page_helper.android_debug + '/person_thumbnail'
        @channel_thumbnail = page_helper.android_debug + '/channel_thumbnail'
      end
    end
  end
end

module Kernel
  def search_page
    Pages::SearchPage
  end
end
