Ошибка с чем связана? /home/daridima/AndroidStudioProjects/Android/app/src/main/java/com/axmor/maxi/view/main/MainNavigationPresenterImpl.java:868: error: cannot find symbol
        router.navigateTo(StoriesScreens.INSTANCE.StoriesPreviewScreen(
                                                 ^
  symbol:   method StoriesPreviewScreen(long,StoriesPreviewFilter,MainPageStoriesInteractor,<null>)
  location: variable INSTANCE of type StoriesScreenspackage com.axmor.maxi.view.main;

import android.content.Intent;
import android.net.Uri;

import androidx.annotation.NonNull;
import androidx.fragment.app.Fragment;
import androidx.work.WorkManager;

import com.axmor.maxi.Constants;
import com.axmor.maxi.controller.MessagesController;
import com.axmor.maxi.controller.PurchaseController;
import com.axmor.maxi.controller.UserInfoController;
import com.axmor.maxi.fragment.BaseFragment;
import com.axmor.maxi.navigation.Navigator;
import com.github.terrakok.cicerone.Router;

import java.util.ArrayList;
import java.util.List;

import javax.inject.Inject;

import de.greenrobot.event.EventBus;
import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.disposables.CompositeDisposable;
import io.reactivex.disposables.Disposable;
import ru.maxi.mobile.BuildConfig;
import ru.maxi.mobile.business.bottomnavigation.BottomNavigationInteractor;
import ru.maxi.mobile.business.deeplinks.DeepLinkInteractor;
import ru.maxi.mobile.business.delivery.cart.SyncCartBackground;
import ru.maxi.mobile.common.card.repository.inmemory.InMemoryCardRepository;
import ru.maxi.mobile.common.client.repository.local.LocalClientRepository;
import ru.maxi.mobile.common.features.business.FeatureProvider;
import ru.maxi.mobile.common.features.core.FeatureType;
import ru.maxi.mobile.common.features.service.UpdateFeaturesWorker;
import ru.maxi.mobile.entity.app.AppIntentData;
import ru.maxi.mobile.entity.app.AppLaunchType;
import ru.maxi.mobile.entity.bottomnavigation.BottomNavigationEvent;
import ru.maxi.mobile.entity.dynamiclink.DynamicLinkType;
import ru.maxi.mobile.entity.featurepromo.FeaturePromoType;
import ru.maxi.mobile.feature.achievements.AchievementsScreens;
import ru.maxi.mobile.feature.adventcalendar.AdventCalendarScreens;
import ru.maxi.mobile.feature.analytics.model.AnalyticType;
import ru.maxi.mobile.feature.analytics.model.actions.AnalyticTabNavigationActions;
import ru.maxi.mobile.feature.analytics.model.events.AnalyticsGeneralEvent;
import ru.maxi.mobile.feature.analytics.model.events.AnalyticsShortcutsWidgetEvent;
import ru.maxi.mobile.feature.analytics.model.eventsource.DeepLinkCouponDetailsEventSource;
import ru.maxi.mobile.feature.analytics.model.eventsource.DeepLinkPostEventSource;
import ru.maxi.mobile.feature.analytics.model.eventsource.ProductEventSource;
import ru.maxi.mobile.feature.analytics.model.eventsource.ProductListProductEventSource;
import ru.maxi.mobile.feature.analytics.usecase.AnalyticsUseCase;
import ru.maxi.mobile.feature.appLink.AppLinkParser;
import ru.maxi.mobile.feature.appRating.repository.local.LocalAppRatingRepository;
import ru.maxi.mobile.feature.birthdaygifts.usecase.ClientBirthdayInteractor;
import ru.maxi.mobile.feature.cardtab.CardScreens;
import ru.maxi.mobile.feature.cardtab.view.CardTabContainerFragment;
import ru.maxi.mobile.feature.cardtab.view.entity.SellHistoryTabType;
import ru.maxi.mobile.feature.catalog.container.ui.CatalogTabContainerFragment;
import ru.maxi.mobile.feature.chips.ChipsScreens;
import ru.maxi.mobile.feature.clientExtraData.ClientExtraDataScreens;
import ru.maxi.mobile.feature.clubs.ClubScreens;
import ru.maxi.mobile.feature.clubs.view.ClubPageAdapter;
import ru.maxi.mobile.feature.lottery.LotteryScreens;
import ru.maxi.mobile.feature.mainpage.MainPageScreens;
import ru.maxi.mobile.feature.mainpage.business.MainPageStoriesInteractor;
import ru.maxi.mobile.feature.marathon.MarathonScreens;
import ru.maxi.mobile.feature.maxiPay.MaxiPayScreens;
import ru.maxi.mobile.feature.maxiPlus.partnersDiscounts.PartnersDiscountsScreens;
import ru.maxi.mobile.feature.messages.business.MessageInteractor;
import ru.maxi.mobile.feature.messages.view.MessagesTabContainerFragment;
import ru.maxi.mobile.feature.messages.worker.SendMessagesWorker;
import ru.maxi.mobile.feature.newCardTab.domain.GetNeedCardTabIndicationUseCase;
import ru.maxi.mobile.feature.offlinepromo.OfflinePromoCodeScreens;
import ru.maxi.mobile.feature.productCollection.domain.PersonalProductCollectionInteractor;
import ru.maxi.mobile.feature.productCollection.ui.ProductCollectionViewData;
import ru.maxi.mobile.feature.productFeedback.ProductFeedbackScreens;
import ru.maxi.mobile.feature.scratchCards.ScratchCardsScreens;
import ru.maxi.mobile.feature.shareChips.ShareChipsScreens;
import ru.maxi.mobile.feature.shoppingList.ShoppingListScreens;
import ru.maxi.mobile.feature.shoppingList.SyncShoppingListsWorker;
import ru.maxi.mobile.feature.stories.StoriesScreens;
import ru.maxi.mobile.feature.stories.model.StoriesPreviewFilter;
import ru.maxi.mobile.feature.stories.model.StoryId;
import ru.maxi.mobile.feature.webfeature.model.NpsWebFeature;
import ru.maxi.mobile.feature.webfeature.model.WebFeature;
import ru.maxi.mobile.feature.widget.shortcuts.ShortcutsWidget;
import ru.maxi.mobile.feature.widget.shortcuts.UpdateShortcutsWidgetsWorker;
import ru.maxi.mobile.presentation.cashback.CashbackScreens;
import ru.maxi.mobile.presentation.common.screens.CommonScreens;
import ru.maxi.mobile.presentation.coupon.CouponScreens;
import ru.maxi.mobile.presentation.delivery.DeliveryScreens;
import ru.maxi.mobile.presentation.featurepromo.FeaturePromoScreens;
import ru.maxi.mobile.presentation.menu.MenuScreens;
import ru.maxi.mobile.presentation.momentDiscount.MomentDiscountScreens;
import ru.maxi.mobile.repositories.common.inmemory.InMemoryNetworkErrorRepository;
import ru.maxi.mobile.repositories.common.model.NetworkErrorEvent;
import ru.maxi.mobile.repositories.deeplink.DeepLink;
import ru.maxi.mobile.repositories.deeplink.DeepLinkExtKt;
import ru.maxi.mobile.repositories.deeplink.DeepLinkType;
import ru.maxi.mobile.repositories.device.LocalDeviceRepository;
import ru.maxi.mobile.service.client.SyncUserPolicyWorker;
import ru.maxi.mobile.service.delivery.SyncFavoriteIdWorker;
import ru.maxi.mobile.service.device.SendDeviceTokenWorker;
import ru.maxi.mobile.service.shops.UpdateShopsWorker;
import ru.maxi.mobile.ui.common.BackButtonListener;
import ru.maxi.mobile.ui.mainpage.MainPageTabContainerFragment;
import ru.maxi.mobile.ui.menu.MenuTabContainerFragment;
import ru.maxi.mobile.utils.MaxiNotificationManager;

/**
 * Презентер для экрана с нижним меню
 * <p>
 * Created by kozhinas on 17.05.18.
 */
public class MainNavigationPresenterImpl implements MainNavigationPresenter {

    @Inject
    UserInfoController userInfoController;
    @Inject
    LocalClientRepository localClientRepository;
    @Inject
    LocalAppRatingRepository localAppRatingRepository;
    @Inject
    Navigator navigator;
    @Inject
    EventBus eventBus;
    @Inject
    PurchaseController purchaseController;
    @Inject
    MessagesController messagesController;
    @Inject
    FeatureProvider featureProvider;
    @Inject
    WorkManager workManager;
    @Inject
    LocalDeviceRepository localDeviceRepository;
    @Inject
    BottomNavigationInteractor bottomNavigationInteractor;
    @Inject
    InMemoryCardRepository inMemoryCardRepository;
    @Inject
    ClientBirthdayInteractor birthdayGiftInteractor;
    @Inject
    AnalyticsUseCase analyticsUseCase;
    @Inject
    DeepLinkInteractor deepLinkInteractor;
    @Inject
    MessageInteractor messageInteractor;
    @Inject
    SyncCartBackground syncCartBackground;
    @Inject
    InMemoryNetworkErrorRepository inMemoryNetworkErrorRepository;
    @Inject
    MaxiNotificationManager maxiNotificationManager;
    @Inject
    GetNeedCardTabIndicationUseCase getNeedCardTabIndication;
    @Inject
    MainPageStoriesInteractor mainPageStoriesInteractor;

    private static final String DEEP_LINK_TYPE_PARAMETER_KEY = "type";
    private static final String DEEP_LINK_ENTITY_ID_PARAMETER_KEY = "entityId";
    private static final String DEEP_LINK_TEXT_PARAMETER_KEY = "text";

    private static final Long PERSONAL_PRODUCT_COLLECTION_ID = -1L;

    private MainNavigationView view;
    private BottomMenuNavigator bottomMenuNavigator;
    private Intent lastManagedIntent;
    private CompositeDisposable compositeDisposable = new CompositeDisposable();
    private Disposable cardTabIndicationDisposable = null;

    private Disposable networkErrorEventDisposable = null;

    /**
     * Конструктор презентера
     *
     * @param view вьюха с нижним меню
     */
    public MainNavigationPresenterImpl(MainNavigationView view) {
        this.view = view;
        bottomMenuNavigator = new BottomMenuNavigator(view);
    }

    @Override
    public void onCreate(BottomMenuNavigatorState state) {
        view.getActivityComponent().inject(this);

        UpdateFeaturesWorker.beginUniqueWorkWith(workManager)
                .then(UpdateShortcutsWidgetsWorker.getAllWidgetsUpdateWorkRequest(
                        new UpdateShortcutsWidgetsWorker.Settings(false, true, false)
                ))
                .enqueue();
        SyncUserPolicyWorker.enqueueUniqueWorkWith(workManager);
        UpdateShopsWorker.enqueueUniqueWorkWith(workManager);
        SendMessagesWorker.enqueueUniqueWorkWith(workManager);

        if (featureProvider.isFeatureAvailable(FeatureType.DELIVERY)) {
            syncCartBackground.invoke(true);
        }

        localAppRatingRepository.incrementSessionCount();

        if (localClientRepository.isUserAuthenticated()) {
            SyncFavoriteIdWorker.enqueueUniqueWorkWith(workManager);
            SendDeviceTokenWorker.enqueueUniqueWorkWith(workManager);
        }

        if (featureProvider.isFeatureAvailable(FeatureType.SHOPPING_LIST)) {
            SyncShoppingListsWorker.enqueueUniqueWorkWith(workManager);
        } else {
            purchaseController.sync();
        }

        addTab(TabType.MAIN_PAGE_TAB, state);
        addTab(TabType.CATALOG_TAB, state);
        addTab(TabType.CARD_TAB, state);
        addTab(TabType.MESSAGES_TAB, state);
        addTab(TabType.MENU_TAB, state);

        if (state != null) {
            bottomMenuNavigator.restoreFromState(state);
        } else {
            bottomMenuNavigator.switchTab(0);
        }

        loadClientData();
        subscribeToUnreadMessagesIndication();
        subscribeToBottomNavigationEvents();
        subscribeToCardTabIndication();
        subscribeToDeepLink();
        subscribeToNetworkError();
    }

    @Override
    public Boolean onBackPressed() {
        Fragment currentFragment = bottomMenuNavigator.getCurrentFragment();
        if ((currentFragment instanceof BaseFragment) && ((BaseFragment) currentFragment).onBackPressed()) {
            return true;
        }
        if (((currentFragment instanceof BackButtonListener) && ((BackButtonListener) currentFragment).onBackPressed())) {
            return true;
        }
        if (!bottomMenuNavigator.isRootPage()) {
            bottomMenuNavigator.popFragment();
            return true;
        }
        if (bottomMenuNavigator.getSelectedTabIndex() != 0) {
            bottomMenuNavigator.switchTab(0);
            return true;
        }
        return false;
    }

    @Override
    public void onDestroy() {
        eventBus.unregister(this);
        compositeDisposable.dispose();
    }

    @Override
    public void onNavigationTabChange(TabType selectedTab) {
        analyticsUseCase.log(
                new AnalyticsGeneralEvent.SelectContent(
                        AnalyticType.TAB_NAVIGATION,
                        AnalyticTabNavigationActions.TAB_SELECT,
                        null,
                        selectedTab.getAnalyticName(),
                        null,
                        null
                )
        );
        bottomMenuNavigator.switchTab(selectedTab);
    }

    private void updateMessageCountPin(boolean hasIndication) {
        int tabIndex = bottomMenuNavigator.getTabIndexByType(TabType.MESSAGES_TAB);
        if (hasIndication) {
            view.showTabIndicator(tabIndex);
        } else {
            view.hideTabIndicator(tabIndex);
        }
    }

    private void addTab(TabType type, BottomMenuNavigatorState state) {
        view.addTab(type);
        List<Fragment> fragmentList = new ArrayList<>();
        if (state != null && state.containsTabData(type)) {
            state.getTabPages(type)
                    .forEach(tag -> {
                        Fragment fragment = bottomMenuNavigator.findFragmentByTag(tag);
                        if (fragment != null) {
                            fragmentList.add(fragment);
                        }
                    });
        }

        if (fragmentList.size() > 0) {
            TabData tab = new TabData(type, fragmentList);
            bottomMenuNavigator.addRootPage(tab);
        } else {
            TabData tab = new TabData(type, getRootFragmentForTab(type));
            bottomMenuNavigator.addRootPage(tab);
        }
    }

    private void updateTab(TabType type) {
        if (bottomMenuNavigator.containsTab(type)) {
            bottomMenuNavigator.changeRootPage(getRootFragmentForTab(type), type);
        }
    }

    private Fragment getRootFragmentForTab(TabType type) {
        return switch (type) {
            case MAIN_PAGE_TAB -> new MainPageTabContainerFragment();
            case CATALOG_TAB -> new CatalogTabContainerFragment();
            case CARD_TAB -> new CardTabContainerFragment();
            case MESSAGES_TAB -> new MessagesTabContainerFragment();
            case MENU_TAB -> new MenuTabContainerFragment();
        };
    }

    @Override
    public void manageIntent(final Intent intent) {
        if (intent == lastManagedIntent) {
            return;
        }

        lastManagedIntent = intent;

        AppIntentData intentData = (AppIntentData) intent.getSerializableExtra(Constants.EXTRA_INTENT_DATA);
        AppLaunchType launchType = (AppLaunchType) intent.getSerializableExtra(Constants.LAUNCH_TYPE);
        if (intentData instanceof AppIntentData.UpdateDeliveryOrderStatus) {
            bottomMenuNavigator.switchTabToRootPage(TabType.MAIN_PAGE_TAB);
        } else if (intentData instanceof AppIntentData.OpenDeepLink data) {
            deepLinkInteractor.saveDeepLink(data.getDeepLink(), true);
        } else if (launchType instanceof AppLaunchType.FromQrWidget) {
            bottomMenuNavigator.switchTabToRootPage(TabType.CARD_TAB);
        } else if (launchType instanceof AppLaunchType.FromShortcutsWidget.OpenAuth) {
            navigator.openAuthPage();
            analyticsUseCase.log(AnalyticsShortcutsWidgetEvent.OpenAuthForAnonymousUser.INSTANCE);
        } else if (launchType instanceof AppLaunchType.FromShortcutsWidget.OpenApp) {
            analyticsUseCase.log(AnalyticsShortcutsWidgetEvent.OpenAppForAuthorizedUser.INSTANCE);
        } else if (launchType instanceof AppLaunchType.FromShortcutsWidget.OpenShortcut) {
            ShortcutsWidget.Shortcut shortcut = ((AppLaunchType.FromShortcutsWidget.OpenShortcut) launchType).getShortcut();
            DeepLinkType deepLinkType = switch (shortcut) {
                case CARD -> new DeepLinkType.SwitchTab(TabType.CARD_TAB);
                case COUPONS -> new DeepLinkType.OpenCoupons(
                        null,
                        DeepLinkCouponDetailsEventSource.INSTANCE
                );
                case DISCOUNTS -> new DeepLinkType.OpenProductCollection(
                        PersonalProductCollectionInteractor.PERSONAL_COLLECTION_ID
                );
                case MOMENT_DISCOUNT -> DeepLinkType.OpenMomentDiscount.INSTANCE;
                case CART -> DeepLinkType.OpenCart.INSTANCE;
                case CATALOG -> new DeepLinkType.SwitchTab(TabType.CATALOG_TAB);
                case SBP -> DeepLinkType.OpenSbpQrScanner.INSTANCE;
            };
            deepLinkInteractor.saveDeepLink(deepLinkType, true);
            analyticsUseCase.log(new AnalyticsShortcutsWidgetEvent.OpenAppFromShortcut(shortcut));
        }
    }

    @Override
    public void parseDynamicLink(@NonNull Uri link) {
        DynamicLinkType dynamicLinkType = null;
        String dynamicLinkTypeParamValue = link.getQueryParameter(DEEP_LINK_TYPE_PARAMETER_KEY);
        if (dynamicLinkTypeParamValue != null) {
            dynamicLinkType = DynamicLinkType.Companion.getByName(dynamicLinkTypeParamValue);
        }

        if (dynamicLinkType == null) {
            return;
        }

        subscribeToNetworkError();
        Long entityId = null;
        String entityIdParamValue = link.getQueryParameter(DEEP_LINK_ENTITY_ID_PARAMETER_KEY);
        if (entityIdParamValue != null) {
            entityId = Long.parseLong(entityIdParamValue);
        }

        String dynamicLinkText = link.getQueryParameter(DEEP_LINK_TEXT_PARAMETER_KEY);
        DeepLinkType deepLinkType = switch (dynamicLinkType) {
            case POST -> new DeepLinkType.OpenPost(entityId, DeepLinkPostEventSource.INSTANCE);
            case CATEGORY -> new DeepLinkType.OpenProductsCategory(entityId);
            case COUPON -> new DeepLinkType.OpenCoupons(
                    entityId,
                    DeepLinkCouponDetailsEventSource.INSTANCE
            );
            case CASHBACK -> DeepLinkType.OpenCashback.INSTANCE;
            case MOMENT_DISCOUNT -> DeepLinkType.OpenMomentDiscount.INSTANCE;
            case LOTTERY -> new DeepLinkType.OpenLottery(entityIdParamValue);
            case CATALOG -> new DeepLinkType.SwitchTab(TabType.CATALOG_TAB);
            case GIFT_CARD -> DeepLinkType.OpenGiftCardPromo.INSTANCE;
            case BIRTHDAY -> DeepLinkType.OpenBirthdayPromo.INSTANCE;
            case CATEGORY_COLLECTION -> new DeepLinkType.OpenCategoryCollection(entityId);
            case PRODUCT_COLLECTION -> new DeepLinkType.OpenProductCollection(entityId);
            case PROMO -> new DeepLinkType.ShowOfflinePromoCode(dynamicLinkText);
            case USER_PROFILE -> DeepLinkType.OpenClientData.INSTANCE;
            case USER_CARD -> new DeepLinkType.SwitchTab(TabType.CARD_TAB);
            case DELIVERY_PROMOCODES -> new DeepLinkType.ShowDeliveryPromoCode(dynamicLinkText);
            case ADVENT_CALENDAR -> DeepLinkType.OpenAdventCalendar.INSTANCE;
            case CLUBS -> new DeepLinkType.OpenClub(entityId);
            case CLUB_COUPONS -> new DeepLinkType.OpenClubCoupons(entityId);
            case CLUBS_LIST -> DeepLinkType.OpenClubsList.INSTANCE;
            case POPULAR_DISCOUNT -> DeepLinkType.OpenPopularProductsDiscount.INSTANCE;
            case WELCOME_PACKAGE -> DeepLinkType.OpenWelcomePackagePromo.INSTANCE;
            case PARTNERS_DISCOUNTS -> new DeepLinkType.OpenPartnersDiscounts(entityId);
            case NPS -> new DeepLinkType.OpenWebFeature(
                    new NpsWebFeature(null, NpsWebFeature.EntryPoint.DEEPLINK)
            );
            case PROFILE_EXTRA_DATA -> DeepLinkType.OpenClientExtraData.INSTANCE;
            case COUPON_FOR_CHIPS -> DeepLinkType.OpenCouponsForChips.INSTANCE;
            case COUPON_FOR_CHIPS_PROMO -> DeepLinkType.OpenCouponsForChipsPromo.INSTANCE;
            case SCRATCH_CARDS -> DeepLinkType.OpenScratchCards.INSTANCE;
            case MARATHON -> DeepLinkType.OpenMarathon.INSTANCE;
            case MAXI_PAY -> DeepLinkType.OpenMaxiPay.INSTANCE;
            case SHOPPING_LIST -> DeepLinkType.OpenShoppingList.INSTANCE;
            case ACHIEVEMENTS -> new DeepLinkType.OpenAchievements(
                    AchievementsScreens.AchievementsTab.IN_PROGRESS_TAB, entityId
            );
            case ACHIEVEMENTS_RECEIVED -> new DeepLinkType.OpenAchievements(
                    AchievementsScreens.AchievementsTab.RECEIVED_TAB, entityId
            );
        };
        deepLinkInteractor.saveDeepLink(deepLinkType, true);
    }

    private void processDeepLink(DeepLink deepLink) {
        DeepLinkType deepLinkType = deepLink.getType();

        FeatureType requiredFeature = DeepLinkExtKt.getRequiredFeature(deepLink.getType());
        if (requiredFeature != null && !featureProvider.isFeatureAvailable(requiredFeature)) return;

        if (deepLink.getClearNavigation()) {
            TabType tabType = DeepLinkExtKt.getRequiredTabType(deepLink.getType());
            bottomMenuNavigator.switchTabToRootPage(tabType);
        } else if (deepLinkType instanceof DeepLinkType.SwitchTab) {
            TabType tabType = DeepLinkExtKt.getRequiredTabType(deepLink.getType());
            bottomMenuNavigator.switchTab(tabType);
            return;
        }

        Router router = bottomMenuNavigator.getCurrentTabRouter();
        if (router == null) return;

        if (deepLinkType instanceof DeepLinkType.OpenPost deepLinkData) {
            openPost(router, deepLinkData);
        } else if (deepLinkType instanceof DeepLinkType.OpenPopularProductsDiscount) {
            openCatalogWithPopularDiscount(router);
        } else if (deepLinkType instanceof DeepLinkType.OpenOrderList deepLinkData) {
            openCatalogWithOrderList(router, deepLinkData);
        } else if (deepLinkType instanceof DeepLinkType.OpenCategoryCollection deepLinkData) {
            openCategoryCollection(router, deepLinkData);
        } else if (deepLinkType instanceof DeepLinkType.OpenProductCollection deepLinkData) {
            openProductCollection(router, deepLinkData);
        } else if (deepLinkType instanceof DeepLinkType.OpenProductsCategory deepLinkData) {
            openProductsCategory(router, deepLinkData);
        } else if (deepLinkType instanceof DeepLinkType.OpenProductDetails deepLinkData) {
            openProductDetails(router, deepLinkData);
        } else if (deepLinkType instanceof DeepLinkType.ShowDeliveryPromoCode deepLinkData) {
            openCatalogWithCartPromoCode(router, deepLinkData);
        } else if (deepLinkType instanceof DeepLinkType.ShowOfflinePromoCode deepLinkData) {
            openCardWithOfflinePromoCode(router, deepLinkData);
        } else if (deepLinkType instanceof DeepLinkType.OpenAdventCalendar) {
            openAdventCalendar(router);
        } else if (deepLinkType instanceof DeepLinkType.OpenCoupons deepLinkData) {
            openCoupons(router, deepLinkData);
        } else if (deepLinkType instanceof DeepLinkType.OpenCouponsForChips) {
            openCouponForChips(router);
        } else if (deepLinkType instanceof DeepLinkType.OpenCouponsForChipsPromo) {
            openFeaturePromo(router, FeaturePromoType.COUPON_FOR_CHIPS);
        } else if (deepLinkType instanceof DeepLinkType.OpenCashback) {
            openCashback(router);
        } else if (deepLinkType instanceof DeepLinkType.OpenClientData) {
            openClientData(router);
        } else if (deepLinkType instanceof DeepLinkType.OpenLottery deepLinkData) {
            openLottery(router, deepLinkData);
        } else if (deepLinkType instanceof DeepLinkType.OpenMomentDiscount) {
            openMomentDiscount(router);
        } else if (deepLinkType instanceof DeepLinkType.OpenBirthdayPromo) {
            openBirthdayPromo(router);
        } else if (deepLinkType instanceof DeepLinkType.OpenGiftCardPromo) {
            openFeaturePromo(router, FeaturePromoType.GIFT_CARD);
        } else if (deepLinkType instanceof DeepLinkType.OpenClub deepLinkData) {
            openClub(router, deepLinkData);
        } else if (deepLinkType instanceof DeepLinkType.OpenClubCoupons deepLinkData) {
            openClubCoupons(router, deepLinkData);
        } else if (deepLinkType instanceof DeepLinkType.OpenClubsList) {
            openClubsList(router);
        } else if (deepLinkType instanceof DeepLinkType.OpenWelcomePackagePromo) {
            openFeaturePromo(router, FeaturePromoType.WELCOME_PACKAGE);
        } else if (deepLinkType instanceof DeepLinkType.OpenCart) {
            openCart(router);
        } else if (deepLinkType instanceof DeepLinkType.OpenSbpQrScanner) {
            openSbpQrScanner(router);
        } else if (deepLinkType instanceof DeepLinkType.OpenPartnersDiscounts deepLinkData) {
            openPartnersDiscounts(router, deepLinkData);
        } else if (deepLinkType instanceof DeepLinkType.OpenWebFeature deepLinkData) {
            openWebFeature(router, deepLinkData.getFeature());
        } else if (deepLinkType instanceof DeepLinkType.OpenClientExtraData) {
            openClientExtraData(router);
        } else if (deepLinkType instanceof DeepLinkType.OpenScratchCards) {
            openScratchCards(router);
        } else if (deepLinkType instanceof DeepLinkType.OpenMarathon) {
            openMarathon(router);
        } else if (deepLinkType instanceof DeepLinkType.OpenExternalLink deepLinkData) {
            openExternalLink(router, deepLinkData, deepLink.getClearNavigation());
        } else if (deepLinkType instanceof DeepLinkType.OpenMaxiPay) {
            openMaxiPay(router);
        } else if
        (deepLinkType instanceof DeepLinkType.OpenMaxiPayPaymentConfirmation deepLinkData) {
            openMaxiPayPaymentConfirmation(router, deepLinkData);
        } else if
        (deepLinkType instanceof DeepLinkType.OpenMaxiPayPaymentNotification deepLinkData) {
            openMaxiPayPaymentNotification(router, deepLinkData);
        } else if (deepLinkType instanceof DeepLinkType.OpenShoppingList) {
            openShoppingList(router);
        } else if (deepLinkType instanceof DeepLinkType.OpenPersonalProductCollection) {
            openPersonalProductCollection(deepLink.getClearNavigation());
        } else if (deepLinkType instanceof DeepLinkType.OpenShopList) {
            openShopList(router);
        } else if (deepLinkType instanceof DeepLinkType.OpenChips) {
            openChips(router);
        } else if (deepLinkType instanceof DeepLinkType.OpenShareChips) {
            openShareChips(router);
        } else if (deepLinkType instanceof DeepLinkType.OpenFeedbackRules) {
            openFeedbackRules(router);
        } else if (deepLinkType instanceof DeepLinkType.OpenAchievements deepLinkData) {
            openAchievements(router, deepLinkData);
        } else if (deepLinkType instanceof DeepLinkType.OpenStories deepLinkData) {
            openStories(router, deepLinkData);
        }
    }

    private void openProductsCategory(
            @NonNull Router router,
            @NonNull DeepLinkType.OpenProductsCategory deepLinkData
    ) {
        router.navigateTo(
                DeliveryScreens.INSTANCE.ProductListScreen(deepLinkData.getCategoryId(), null)
        );
    }

    private void openProductDetails(
            @NonNull Router router,
            @NonNull DeepLinkType.OpenProductDetails deepLinkData
    ) {
        Long categoryId = deepLinkData.getCategoryId();
        if (categoryId != null) {
            router.navigateTo(DeliveryScreens.INSTANCE.ProductListScreen(categoryId, null));
        }

        ProductEventSource eventSource = deepLinkData.getEventSource();
        if (eventSource == null) {
            String eventCategoryId = (categoryId != null) ? String.valueOf(categoryId) : null;
            eventSource = new ProductListProductEventSource(eventCategoryId, null);
        }
        router.navigateTo(
                DeliveryScreens.INSTANCE.ProductDetailInfoScreen(
                        String.valueOf(deepLinkData.getProductId()),
                        categoryId,
                        null,
                        eventSource,
                        null
                )
        );
    }

    private void openAdventCalendar(@NonNull Router router) {
        router.navigateTo(AdventCalendarScreens.INSTANCE.ContainerScreen());
    }

    private void openCoupons(
            @NonNull Router router,
            @NonNull DeepLinkType.OpenCoupons deepLinkData
    ) {
        router.navigateTo(CouponScreens.INSTANCE.ContainerScreen());
        if (deepLinkData.getCouponId() != null) {
            router.navigateTo(
                    CouponScreens.INSTANCE.CouponDetailsScreen(
                            deepLinkData.getCouponId(),
                            deepLinkData.getEventSource())
            );
        }
    }

    private void openCashback(@NonNull Router router) {
        router.navigateTo(CashbackScreens.INSTANCE.ContainerScreen());
    }

    private void openLottery(@NonNull Router router,
                             @NonNull DeepLinkType.OpenLottery deepLinkData) {
        router.navigateTo(LotteryScreens.INSTANCE.ContainerScreen(deepLinkData.getLotteryId()));
    }

    private void openMomentDiscount(@NonNull Router router) {
        router.navigateTo(MomentDiscountScreens.INSTANCE.ContainerScreen());
    }

    private void openFeaturePromo(
            @NonNull Router router,
            @NonNull FeaturePromoType featurePromoType
    ) {
        router.navigateTo(FeaturePromoScreens.INSTANCE.ContainerScreen(featurePromoType));
    }

    private void openBirthdayPromo(@NonNull Router router) {
        FeaturePromoType featurePromoType = birthdayGiftInteractor.haveBirthdayGifts()
                ? FeaturePromoType.BIRTHDAY_GIFTS
                : FeaturePromoType.BIRTHDAY;

        openFeaturePromo(router, featurePromoType);
    }

    private void openClub(@NonNull Router router, @NonNull DeepLinkType.OpenClub deepLinkData) {
        router.navigateTo(
                ClubScreens.INSTANCE.ContainerScreen(deepLinkData.getClubId())
        );
    }

    private void openClubCoupons(
            @NonNull Router router,
            @NonNull DeepLinkType.OpenClubCoupons deepLinkData
    ) {
        router.navigateTo(
                ClubScreens.INSTANCE.ContainerScreen(
                        deepLinkData.getClubId(),
                        ClubPageAdapter.Page.PersonalOffers
                )
        );
    }

    private void openClubsList(@NonNull Router router) {
        router.navigateTo(ClubScreens.INSTANCE.ClubListScreen());
    }

    private void openCatalogWithOrderList(
            @NonNull Router router,
            @NonNull DeepLinkType.OpenOrderList deepLinkData
    ) {
        router.navigateTo(
                CardScreens.INSTANCE.SellHistoryScreen(
                        SellHistoryTabType.ORDER_LIST,
                        deepLinkData.getNewOrderId(),
                        deepLinkData.getExternalOrderId()
                )
        );
    }

    private void openCatalogWithPopularDiscount(@NonNull Router router) {
        router.navigateTo(
                DeliveryScreens.INSTANCE.CatalogScreen(
                        DeliveryScreens.INSTANCE.CatalogPopularScreenName(),
                        true,
                        null
                )
        );
    }

    private void openCatalogWithCartPromoCode(
            @NonNull Router router,
            @NonNull DeepLinkType.ShowDeliveryPromoCode deepLinkData
    ) {
        router.replaceScreen(
                DeliveryScreens.INSTANCE.CatalogScreen(
                        DeliveryScreens.INSTANCE.CatalogScreenName(),
                        false,
                        deepLinkData.getPromoCode()
                )
        );
    }

    private void openCardWithOfflinePromoCode(
            @NonNull Router router,
            @NonNull DeepLinkType.ShowOfflinePromoCode deepLinkData
    ) {
        router.navigateTo(
                OfflinePromoCodeScreens.INSTANCE.OfflinePromoCodeListScreen(deepLinkData.getPromoCode())
        );
    }

    private void openCategoryCollection(
            @NonNull Router router,
            @NonNull DeepLinkType.OpenCategoryCollection deepLinkData
    ) {
        router.navigateTo(
                MainPageScreens.INSTANCE.CategoryCollectionScreen(
                        deepLinkData.getCollectionId(), ""
                )
        );
    }

    private void openProductCollection(
            @NonNull Router router,
            @NonNull DeepLinkType.OpenProductCollection deepLinkData
    ) {
        long collectionId = deepLinkData.getCollectionId();
        ProductCollectionViewData collectionData =
                new ProductCollectionViewData.MainPageProductsCollection(collectionId);

        if (collectionId == PERSONAL_PRODUCT_COLLECTION_ID) {
            router.navigateTo(CommonScreens.INSTANCE.PersonalProductCollectionScreen(collectionData));
        } else {
            router.navigateTo(
                    CommonScreens.INSTANCE.ProductCollectionScreen(collectionData)
            );
        }
    }

    private void loadClientData() {
        userInfoController.reloadProfile();
        userInfoController.updateDialog();
    }


    private void openPost(@NonNull Router router, @NonNull DeepLinkType.OpenPost deepLinkData) {
        router.navigateTo(
                CommonScreens.INSTANCE.PostDetailScreen(
                        deepLinkData.getPostId(),
                        false,
                        deepLinkData.getEventSource())
        );
    }

    private void openClientData(@NonNull Router router) {
        router.navigateTo(
                MenuScreens.INSTANCE.ClientDataScreen(false)
        );
    }

    private void openClientExtraData(@NonNull Router router) {
        router.navigateTo(
                ClientExtraDataScreens.INSTANCE.SurveyResultsScreen()
        );
    }

    private void openCart(@NonNull Router router) {
        router.navigateTo(
                DeliveryScreens.INSTANCE.CartContainer()
        );
    }

    private void openSbpQrScanner(@NonNull Router router) {
        router.navigateTo(
                CardScreens.INSTANCE.TabContentScreen(true)
        );
    }

    private void openPartnersDiscounts(
            @NonNull Router router,
            @NonNull DeepLinkType.OpenPartnersDiscounts deepLinkData
    ) {
        router.navigateTo(
                PartnersDiscountsScreens.INSTANCE.DiscountsContainerScreen(deepLinkData.getDiscountId())
        );
    }

    private void openWebFeature(@NonNull Router router, @NonNull WebFeature feature) {
        router.navigateTo(
                CommonScreens.INSTANCE.WebFeatureScreen(feature)
        );
    }

    private void openCouponForChips(@NonNull Router router) {
        router.navigateTo(CouponScreens.INSTANCE.CouponForChipsScreen());
    }

    private void openScratchCards(@NonNull Router router) {
        router.navigateTo(ScratchCardsScreens.INSTANCE.ContainerScreen());
    }

    private void openMarathon(@NonNull Router router) {
        router.navigateTo(MarathonScreens.INSTANCE.ContainerScreen());
    }

    private void openExternalLink(
            @NonNull Router router,
            @NonNull DeepLinkType.OpenExternalLink deepLinkData,
            boolean clearNavigation
    ) {
        String url = deepLinkData.getUrl();
        DeepLinkType deepLinkType = AppLinkParser.Companion.parseUri(Uri.parse(url));
        if (deepLinkType != null) {
            DeepLink deepLink = new DeepLink(deepLinkType, clearNavigation);
            processDeepLink(deepLink);
            return;
        }

        if (url.startsWith("https://" + BuildConfig.MAXI_RETAIL_HOST)) {
            WebFeature feature = WebFeature.Companion.invoke(Uri.parse(url));
            openWebFeature(router, feature);
        } else {
            router.navigateTo(CommonScreens.INSTANCE.ExternalUriScreen(Uri.parse(url), null));
        }
    }

    private void openMaxiPay(@NonNull Router router) {
        router.navigateTo(MaxiPayScreens.INSTANCE.ContainerScreen());
    }

    private void openMaxiPayPaymentConfirmation(
            @NonNull Router router,
            @NonNull DeepLinkType.OpenMaxiPayPaymentConfirmation deepLinkData
    ) {
        String paymentUuid = deepLinkData.getPaymentUuid();
        Integer notificationId = deepLinkData.getNotificationId();
        router.navigateTo(MaxiPayScreens.INSTANCE.PaymentConfirmationScreen(paymentUuid));
        maxiNotificationManager.hideNotification(notificationId);
    }

    private void openMaxiPayPaymentNotification(
            @NonNull Router router,
            @NonNull DeepLinkType.OpenMaxiPayPaymentNotification deepLinkData
    ) {
        String paymentUuid = deepLinkData.getPaymentUuid();
        router.navigateTo(MaxiPayScreens.INSTANCE.PaymentNotificationScreen(paymentUuid));
    }

    private void openShoppingList(@NonNull Router router) {
        router.navigateTo(ShoppingListScreens.INSTANCE.ContainerScreen());
    }

    private void openPersonalProductCollection(boolean clearNavigation) {
        DeepLinkType deepLinkType =
                new DeepLinkType.OpenProductCollection(PERSONAL_PRODUCT_COLLECTION_ID);
        DeepLink deepLink = new DeepLink(deepLinkType, clearNavigation);
        processDeepLink(deepLink);
    }

    private void openShopList(@NonNull Router router) {
        router.navigateTo(MenuScreens.INSTANCE.ShopListScreen());
    }

    private void openChips(@NonNull Router router) {
        router.navigateTo(
                ChipsScreens.INSTANCE.ContainerScreen(
                        ChipsScreens.ContainerTab.getEntries().get(0)
                )
        );
    }

    private void openShareChips(@NonNull Router router) {
        router.navigateTo(ShareChipsScreens.INSTANCE.MainScreen());
    }

    private void openFeedbackRules(@NonNull Router router) {
        router.navigateTo(ProductFeedbackScreens.INSTANCE.RulesScreen());
    }

    private void openAchievements(
            @NonNull Router router,
            @NonNull DeepLinkType.OpenAchievements deepLinkData
    ) {
        router.navigateTo(AchievementsScreens.INSTANCE.ContainerScreen(
                deepLinkData.getInitialTab(),
                deepLinkData.getAchievementId()
        ));
    }

    private void openStories(
            @NonNull Router router,
            @NonNull DeepLinkType.OpenStories deepLinkData
    ) {
//        StoryId storyId = new StoryId(deepLinkData.getStartStoryId());
        StoriesPreviewFilter filter = StoriesPreviewFilter.ALL;
        router.navigateTo(StoriesScreens.INSTANCE.StoriesPreviewScreen(
                deepLinkData.getStartStoryId(),
                filter,
                mainPageStoriesInteractor,
                null
        ));
    }

    private void subscribeToCardTabIndication() {
        if (cardTabIndicationDisposable != null) {
            boolean removed = compositeDisposable.remove(cardTabIndicationDisposable);
            if (!removed) {
                cardTabIndicationDisposable.dispose();
            }
            cardTabIndicationDisposable = null;
        }

        cardTabIndicationDisposable = getNeedCardTabIndication.getCardTabIndicationFlowable()
                .observeOn(AndroidSchedulers.mainThread())
                .subscribe(hasIndication -> {
                    int tabIndex = bottomMenuNavigator.getTabIndexByType(TabType.CARD_TAB);
                    if (hasIndication) {
                        view.showTabIndicator(tabIndex);
                    } else {
                        view.hideTabIndicator(tabIndex);
                    }
                });
        compositeDisposable.add(cardTabIndicationDisposable);
    }

    private void subscribeToDeepLink() {
        Disposable deepLinkDisposable = deepLinkInteractor.getDeepLinkFlowable()
                .observeOn(AndroidSchedulers.mainThread())
                .subscribe(this::processDeepLink);
        compositeDisposable.add(deepLinkDisposable);
    }

    private void subscribeToBottomNavigationEvents() {
        Disposable bottomNavigationEventDisposable = bottomNavigationInteractor.getEventSource()
                .observeOn(AndroidSchedulers.mainThread())
                .subscribe(bottomNavigationEvent -> {
                    if (bottomNavigationEvent instanceof BottomNavigationEvent.SwitchTab) {
                        TabType tabType = ((BottomNavigationEvent.SwitchTab) bottomNavigationEvent).getTabType();
                        bottomMenuNavigator.switchTab(tabType);
                    } else if (bottomNavigationEvent instanceof BottomNavigationEvent.SwitchTabToRootPage) {
                        TabType tabType = ((BottomNavigationEvent.SwitchTabToRootPage) bottomNavigationEvent).getTabType();
                        bottomMenuNavigator.switchTabToRootPage(tabType);
                    } else if (bottomNavigationEvent instanceof BottomNavigationEvent.UpdateTab) {
                        TabType tabType = ((BottomNavigationEvent.UpdateTab) bottomNavigationEvent).getTabType();
                        updateTab(tabType);
                    }
                });
        compositeDisposable.add(bottomNavigationEventDisposable);
    }

    private void subscribeToUnreadMessagesIndication() {
        Disposable messageEventDisposable = messageInteractor.getHasIndicationFlowable()
                .observeOn(AndroidSchedulers.mainThread())
                .subscribe(this::updateMessageCountPin);
        compositeDisposable.add(messageEventDisposable);
    }

    private void subscribeToNetworkError() {
        networkErrorEventDisposable = inMemoryNetworkErrorRepository.getEventFlowable()
                .observeOn(AndroidSchedulers.mainThread())
                .subscribe(event -> {
                            if (event instanceof NetworkErrorEvent.ShouldLogout) {
                                processShouldLogout();
                            } else if (event instanceof NetworkErrorEvent.UpgradeRequired) {
                                navigator.showUpgradeRequiredScreen();
                            }
                        }
                );
        compositeDisposable.add(networkErrorEventDisposable);
    }

    private void processShouldLogout() {
        userInfoController.logout();
        navigator.openAuthPage();
        if (networkErrorEventDisposable != null) {
            boolean removed =
                    compositeDisposable.remove(networkErrorEventDisposable);
            if (!removed) {
                networkErrorEventDisposable.dispose();
            }
            networkErrorEventDisposable = null;
            inMemoryNetworkErrorRepository.clearRepository();
        }
    }

    //TODO Удалить после переписывания на отдельные дагер компоненты. Нужно для получения навигатора для классов где собственного нет
    @Override
    public BottomMenuNavigator getBottomMenuNavigator() {
        return bottomMenuNavigator;
    }

    @Override
    public BottomMenuNavigatorState getState() {
        return bottomMenuNavigator.getState();
    }

}
package ru.maxi.mobile.repositories.deeplink

import com.axmor.maxi.view.main.TabType
import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable
import ru.maxi.mobile.feature.achievements.AchievementsScreens
import ru.maxi.mobile.feature.analytics.model.eventsource.CouponDetailsEventSource
import ru.maxi.mobile.feature.analytics.model.eventsource.PostEventSource
import ru.maxi.mobile.feature.analytics.model.eventsource.ProductEventSource
import ru.maxi.mobile.feature.webfeature.model.WebFeature

/**
 * Типы глубинных ссылок приложения
 */
@Suppress("serial")
sealed interface DeepLinkType : java.io.Serializable {

    /**
     * Перейти на таб с типом [tabType]
     */
    @Serializable
    data class SwitchTab(
        @SerialName("tab_type")
        val tabType: TabType,
    ) : DeepLinkType

    /**
     * Открыть пост с идентификатором [postId]
     *
     * @property eventSource источник событий аналитики
     */
    @Serializable
    data class OpenPost(
        @SerialName("post_id")
        val postId: Long,
        @SerialName("event_source")
        val eventSource: PostEventSource,
    ) : DeepLinkType

    /**
     * Открыть скидки на часто покупаемые товары
     */
    @Serializable
    data object OpenPopularProductsDiscount : DeepLinkType

    /**
     * Открыть историю заказов
     */
    @Serializable
    data class OpenOrderList(
        val newOrderId: Long? = null,
        val externalOrderId: Long? = null,
    ) : DeepLinkType

    /**
     * Открыть категорийную подборку с идентификатором [collectionId]
     */
    @Serializable
    data class OpenCategoryCollection(
        @SerialName("collection_id")
        val collectionId: Long,
    ) : DeepLinkType

    /**
     * Открыть товарную подборку с идентификатором [collectionId]
     */
    @Serializable
    data class OpenProductCollection(
        @SerialName("collection_id")
        val collectionId: Long,
    ) : DeepLinkType

    /**
     * Открыть категорию товаров с идентификатором [categoryId]
     */
    @Serializable
    data class OpenProductsCategory(
        @SerialName("category_id")
        val categoryId: Long,
    ) : DeepLinkType

    /**
     * Открыть деталку товара с идентификатором [productId] с переходом в категорию [categoryId]
     */
    @Serializable
    data class OpenProductDetails(
        @SerialName("product_id")
        val productId: Long,
        @SerialName("category_id")
        val categoryId: Long? = null,
        @SerialName("event_source")
        val eventSource: ProductEventSource? = null,
    ) : DeepLinkType

    /**
     * Отобразить промокод доставки с текстом [promoCode]
     */
    @Serializable
    data class ShowDeliveryPromoCode(
        @SerialName("promo_code")
        val promoCode: String,
    ) : DeepLinkType

    /**
     * Отобразить оффлайн-промокод с текстом [promoCode]
     */
    @Serializable
    data class ShowOfflinePromoCode(
        @SerialName("promo_code")
        val promoCode: String?,
    ) : DeepLinkType

    /**
     * Открыть функционал адвент-календаря
     */
    @Serializable
    data object OpenAdventCalendar : DeepLinkType

    /**
     * Открыть функционал купонов
     *
     * @param couponId идентификатор купона для открытия деталки
     * @property eventSource источник событий аналитики
     */
    @Serializable
    data class OpenCoupons(
        @SerialName("coupon_id")
        val couponId: Long? = null,
        @SerialName("event_source")
        val eventSource: CouponDetailsEventSource,
    ) : DeepLinkType

    /**
     * Открыть функционал купонов за фишки
     */
    @Serializable
    data object OpenCouponsForChips : DeepLinkType

    /**
     * Открыть промо-страницу купонов за фишки
     */
    @Serializable
    data object OpenCouponsForChipsPromo : DeepLinkType

    /**
     * Открыть функционал кешбэка
     */
    @Serializable
    data object OpenCashback : DeepLinkType

    /**
     * Открыть анкету клиента
     */
    @Serializable
    data object OpenClientData : DeepLinkType

    /**
     * Открыть функционал розыгрышей с идентификатором [lotteryId]
     */
    @Serializable
    data class OpenLottery(
        @SerialName("lottery_id")
        val lotteryId: String? = null,
    ) : DeepLinkType

    /**
     * Открыть функционал моментальной скидки
     */
    @Serializable
    data object OpenMomentDiscount : DeepLinkType

    /**
     * Открыть промо-страницу дня рождения
     */
    @Serializable
    data object OpenBirthdayPromo : DeepLinkType

    /**
     * Открыть промо-страницу подарочной карты
     */
    @Serializable
    data object OpenGiftCardPromo : DeepLinkType

    /**
     * Открыть функционал клуба с идентификатором [clubId]
     */
    @Serializable
    data class OpenClub(
        @SerialName("club_id")
        val clubId: Long,
    ) : DeepLinkType

    /**
     * Открыть список купонов в функционале клуба с идентификатором [clubId]
     */
    @Serializable
    data class OpenClubCoupons(
        @SerialName("club_id")
        val clubId: Long,
    ) : DeepLinkType

    /**
     * Открыть список клубов
     */
    @Serializable
    data object OpenClubsList : DeepLinkType

    /**
     * Открыть промо-страницу Welcome-пакета
     */
    @Serializable
    data object OpenWelcomePackagePromo : DeepLinkType

    /**
     * Открыть корзину
     */
    @Serializable
    data object OpenCart : DeepLinkType

    /**
     * Открыть сканер QR-кода для оплаты через СБП
     */
    @Serializable
    data object OpenSbpQrScanner : DeepLinkType

    /**
     * Открыть функционал скидок партнёров
     *
     * @param discountId опциональный идентификатор скидки партнёра
     */
    @Serializable
    data class OpenPartnersDiscounts(
        @SerialName("discount_id")
        val discountId: Long?,
    ) : DeepLinkType

    /**
     * Открыть Web-фичу [feature]
     */
    @Serializable
    data class OpenWebFeature(
        @SerialName("feature")
        val feature: WebFeature,
    ) : DeepLinkType

    /**
     * Открыть экран экстраданных клиента
     */
    @Serializable
    data object OpenClientExtraData : DeepLinkType

    /**
     * Открыть функционал скретч-карт
     */
    @Serializable
    data object OpenScratchCards : DeepLinkType

    /**
     * Открыть функционал марафона
     */
    @Serializable
    data object OpenMarathon : DeepLinkType

    /**
     * Открыть внешнюю ссылку [url]
     */
    @Serializable
    data class OpenExternalLink(
        @SerialName("url")
        val url: String,
    ) : DeepLinkType

    /**
     * Открыть функционал Макси Pay
     */
    @Serializable
    data object OpenMaxiPay : DeepLinkType

    /**
     * Открыть подтверждение оплаты в функционале Макси Pay
     *
     * @param paymentUuid UUID оплаты
     * @param notificationId идентификатор уведомления
     */
    @Serializable
    data class OpenMaxiPayPaymentConfirmation(
        @SerialName("uuid")
        val paymentUuid: String,
        @SerialName("notification_id")
        val notificationId: Int,
    ) : DeepLinkType

    /**
     * Открыть уведомление об оплате в функционале Макси Pay
     *
     * @param paymentUuid UUID оплаты
     */
    @Serializable
    data class OpenMaxiPayPaymentNotification(
        @SerialName("uuid")
        val paymentUuid: String,
    ) : DeepLinkType

    /**
     * Открыть функционал списка покупок
     */
    @Serializable
    data object OpenShoppingList : DeepLinkType

    /**
     * Открыть функционал персональной товарной подборки
     */
    @Serializable
    data object OpenPersonalProductCollection : DeepLinkType

    /**
     * Открыть список магазинов
     */
    @Serializable
    data object OpenShopList : DeepLinkType

    /**
     * Открыть экран с фишками
     */
    @Serializable
    data object OpenChips : DeepLinkType

    /**
     * Открыть экран "Поделиться фишками"
     */
    @Serializable
    data object OpenShareChips : DeepLinkType

    /**
     * Открыть экран с правилами публикации отзыва
     */
    @Serializable
    data object OpenFeedbackRules : DeepLinkType

    /**
     * Открыть функционал достижений
     *
     * @param initialTab стартовый таб экрана
     */
    @Serializable
    data class OpenAchievements(
        @SerialName("initial_tab")
        val initialTab: AchievementsScreens.AchievementsTab,
        @SerialName("achievement_id")
        val achievementId: Long? = null,
    ) : DeepLinkType

    /**
     * Открыть функционал Stories
     *
     * @param startStoryId идентификатор начальной сторис
     */
    @Serializable
    data class OpenStories(
        @SerialName("start_story_id")
        val startStoryId: Long,
    ) : DeepLinkType
}