   (visibilities) -> visibilities.get stateId
 ]
 
-chatInputSearchItems         = (stateId) -> [
+chatInputSearchItems = (stateId) -> [
   ChatInputSearchStore
   (searchStore) -> searchStore.get stateId
 ]
-chatInputSearchQuery         = (stateId) -> [
+chatInputSearchQuery = (stateId) -> [
   ChatInputSearchQueryStore
   (queries) -> queries.get stateId
 ]
-chatInputSearchRawIndex      = (stateId) -> [
+chatInputSearchRawIndex = (stateId) -> [
   ChatInputSearchSelectedIndexStore
   (indexes) -> indexes.get stateId
 ]

  CommonEmojiListSelectedIndexStore
  (indexes) -> indexes.get stateId
]
commonEmojiListVisibility    = (stateId) -> [
  CommonEmojiListVisibilityStore
  (visibilities) -> visibilities.get stateId
]
# Returns emoji from emoji list by current selected index
commonEmojiListSelectedItem  = (stateId) -> [
  commonEmojiList
  commonEmojiListSelectedIndex stateId
  getListSelectedItem
]

chatInputChannelsQuery         = (stateId) -> [
  ChatInputChannelsQueryStore
  (queries) -> queries.get stateId
]
# Returns a list of channels depending on the current query
# If query if empty, returns popular channels
# Otherwise, returns channels filtered by query
chatInputChannels              = (stateId) -> [
  ChannelsStore
  popularChannels
  chatInputChannelsQuery stateId

  filteredEmojiListRawIndex stateId
  calculateListSelectedIndex
]
filteredEmojiListSelectedItem = (stateId) -> [
  filteredEmojiList stateId
  filteredEmojiListSelectedIndex stateId
  getListSelectedItem
