package ru.otus.mobile.component;

import com.codeborne.selenide.SelenideElement;
import com.google.inject.Inject;
import io.appium.java_client.AppiumBy;

import static com.codeborne.selenide.appium.SelenideAppium.$;

public final class BottomNavigationComponent extends BaseMobileComponent {
    private final SelenideElement mineMenu;
    private final SelenideElement usersMenu;

    @Inject
    public BottomNavigationComponent() {
        this($(AppiumBy.id(fullIdValue("bottom_navigation"))));
    }

    public BottomNavigationComponent(SelenideElement root) {
        super(root);
        this.mineMenu = byIdInRoot("mine_menu");
        this.usersMenu = byIdInRoot("users_menu");
    }

    public void openWishlists() {
        mineMenu.click();
    }

    public void openUsers() {
        usersMenu.click();
    }
}
