package com.example.pmulabs.basecomponents.navigate

import com.example.pmulabs.R

const val SEARCH_ARGUMENT_TEXT="text"
const val CALENDAR_ARGUMENT_DATE="date"
const val SEARCHBYTAG_ARGUMENT_KEY="id"
const val ARTICLE_ARGUMENT_KEY="id"

sealed class BottomBarScreen(
    val route: String,
    val title: String,
    val icon: Int,
    val iconFocused: Int

){
    object Profile: BottomBarScreen(
        route = "PROFILE",
        title="Me",
        icon= R.drawable.ic_bottom_profile,
        iconFocused=R.drawable.ic_bottom_profile_focused
    )
    object Categories: BottomBarScreen(
        route = "CATEGORIES",
        title="Tags",
        icon= R.drawable.ic_bottom_categories,
        iconFocused=R.drawable.ic_bottom_categories_focused
    )
    object Main: BottomBarScreen(
        route = "MAIN",
        title="Main",
        icon= R.drawable.ic_bottom_main,
        iconFocused=R.drawable.ic_bottom_main_focused
    )
    object ArticlePage: BottomBarScreen(
        route = "ARTICLEPAGE/{$ARTICLE_ARGUMENT_KEY}",
        title="Article",
        icon= R.drawable.ic_bottom_main,
        iconFocused=R.drawable.ic_bottom_main_focused
    ){
        fun passId(id: String): String{
            return "ARTICLEPAGE/$id"
        }
    }
    object Search: BottomBarScreen(
        route = "SEARCH/{$SEARCH_ARGUMENT_TEXT}",
        title="Search",
        icon= R.drawable.ic_bottom_main,
        iconFocused=R.drawable.ic_bottom_main_focused
    ){
        fun passText(text: String): String{
            return "SEARCH/$text"
        }
    }
    object Calendar: BottomBarScreen(
        route = "CALENDAR/{$CALENDAR_ARGUMENT_DATE}",
        title="Calendar",
        icon= R.drawable.ic_bottom_main,
        iconFocused=R.drawable.ic_bottom_main_focused
    ){
        fun passDate(date: String): String{
            return "CALENDAR/$date"
        }
    }
    object SearchByTag: BottomBarScreen(
        route = "SEARCHBYTAG/{$SEARCHBYTAG_ARGUMENT_KEY}",
        title="SEARCHBYTAG",
        icon= R.drawable.ic_bottom_main,
        iconFocused=R.drawable.ic_bottom_main_focused
    ){
        fun passId(id: String): String{
            return "SEARCHBYTAG/$id"
        }
    }
    object Cooperation: BottomBarScreen(
        route = "COOPERATION",
        title="Coop",
        icon= R.drawable.ic_bottom_cooperation,
        iconFocused=R.drawable.ic_bottom_cooperation_focused
    )
    object Info: BottomBarScreen(
        route = "INFO",
        title="Info",
        icon= R.drawable.ic_bottom_info,
        iconFocused=R.drawable.ic_bottom_info_focused
    )
}
