<commit_before>package org.stepik.android.view.injection.learning_actions

import androidx.lifecycle.ViewModel
import dagger.Module
import dagger.Provides
import dagger.multibindings.IntoMap
import org.stepik.android.presentation.base.injection.ViewModelKey
import org.stepik.android.presentation.learning_actions.LearningActionsFeature
import org.stepik.android.presentation.learning_actions.LearningActionsViewModel
import org.stepik.android.presentation.learning_actions.reducer.LearningActionsReducer
import org.stepik.android.presentation.user_reviews.UserReviewsFeature
import org.stepik.android.presentation.user_reviews.dispatcher.UserReviewsActionDispatcher
import org.stepik.android.presentation.wishlist.WishlistFeature
import org.stepik.android.presentation.wishlist.dispatcher.WishlistActionDispatcher
import ru.nobird.android.core.model.safeCast
import ru.nobird.android.presentation.redux.container.wrapWithViewContainer
import ru.nobird.android.presentation.redux.dispatcher.transform
import ru.nobird.android.presentation.redux.dispatcher.wrapWithActionDispatcher
import ru.nobird.android.presentation.redux.feature.ReduxFeature

@Module
object LearningActionsPresentationModule {
    /**
     * Presentation
     */
    @Provides
    @IntoMap
    @ViewModelKey(LearningActionsViewModel::class)
    internal fun provideLearningActionsPresenter(
        learningActionsReducer: LearningActionsReducer,
        wishlistActionDispatcher: WishlistActionDispatcher,
        userReviewsActionDispatcher: UserReviewsActionDispatcher
    ): ViewModel =
        LearningActionsViewModel(
            ReduxFeature(
                LearningActionsFeature.State(
                    wishlistState = WishlistFeature.State.Idle,
                    userReviewsState = UserReviewsFeature.State.Idle
                ), learningActionsReducer
            )
                .wrapWithActionDispatcher(
                    wishlistActionDispatcher.transform(
                        transformAction = { it.safeCast<LearningActionsFeature.Action.WishlistAction>()?.action },
                        transformMessage = LearningActionsFeature.Message::WishlistMessage
                    ))
                .wrapWithActionDispatcher(
                    userReviewsActionDispatcher.tranform(
                        transformAction = { it.safeCast<LearningActionsFeature.Action.UserReviewsAction>()?.action },
                        transformMessage = LearningActionsFeature.Message::UserReviewsMessage
                    )
                )
                .wrapWithViewContainer()
        )
}<commit_msg>Fix after library update<commit_after>package org.stepik.android.view.injection.learning_actions

import androidx.lifecycle.ViewModel
import dagger.Module
import dagger.Provides
import dagger.multibindings.IntoMap
import org.stepik.android.presentation.base.injection.ViewModelKey
import org.stepik.android.presentation.learning_actions.LearningActionsFeature
import org.stepik.android.presentation.learning_actions.LearningActionsViewModel
import org.stepik.android.presentation.learning_actions.reducer.LearningActionsReducer
import org.stepik.android.presentation.user_reviews.UserReviewsFeature
import org.stepik.android.presentation.user_reviews.dispatcher.UserReviewsActionDispatcher
import org.stepik.android.presentation.wishlist.WishlistFeature
import org.stepik.android.presentation.wishlist.dispatcher.WishlistActionDispatcher
import ru.nobird.android.core.model.safeCast
import ru.nobird.android.presentation.redux.container.wrapWithViewContainer
import ru.nobird.android.presentation.redux.dispatcher.transform
import ru.nobird.android.presentation.redux.dispatcher.wrapWithActionDispatcher
import ru.nobird.android.presentation.redux.feature.ReduxFeature

@Module
object LearningActionsPresentationModule {
    /**
     * Presentation
     */
    @Provides
    @IntoMap
    @ViewModelKey(LearningActionsViewModel::class)
    internal fun provideLearningActionsPresenter(
        learningActionsReducer: LearningActionsReducer,
        wishlistActionDispatcher: WishlistActionDispatcher,
        userReviewsActionDispatcher: UserReviewsActionDispatcher
    ): ViewModel =
        LearningActionsViewModel(
            ReduxFeature(
                LearningActionsFeature.State(
                    wishlistState = WishlistFeature.State.Idle,
                    userReviewsState = UserReviewsFeature.State.Idle
                ), learningActionsReducer
            )
                .wrapWithActionDispatcher(
                    wishlistActionDispatcher.transform(
                        transformAction = { it.safeCast<LearningActionsFeature.Action.WishlistAction>()?.action },
                        transformMessage = LearningActionsFeature.Message::WishlistMessage
                    ))
                .wrapWithActionDispatcher(
                    userReviewsActionDispatcher.transform(
                        transformAction = { it.safeCast<LearningActionsFeature.Action.UserReviewsAction>()?.action },
                        transformMessage = LearningActionsFeature.Message::UserReviewsMessage
                    )
                )
                .wrapWithViewContainer()
        )
}
{'fraction_non_alphanumeric': 0.06748466257668712, 'fraction_numerical': 0.0, 'mean_word_length': 3.2345779220779223, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2410805', 'n_tokens_mistral': 1356, 'n_tokens_neox': 1220, 'n_words': 151}