package com.prodhack.moscow2025.presentation.screens.editResume

import androidx.compose.runtime.Composable
import androidx.navigation.NavBackStackEntry
import com.prodhack.moscow2025.presentation.navigation.AppDestination
import com.prodhack.moscow2025.presentation.screens.createResume.CreateResumeScreen
import com.prodhack.moscow2025.presentation.utils.ErrorCollectorScope
import org.koin.androidx.compose.koinViewModel
import org.koin.core.parameter.parametersOf

@Composable
fun ErrorCollectorScope.EditResumeScreen(
	navBackStackEntry: NavBackStackEntry,
	viewModel: EditResumeViewModel = koinViewModel {
		parametersOf(
			navBackStackEntry.arguments?.getString(AppDestination.ResumeEdit.ARG_ID, "") ?: ""
		)
	},
	openResumeDetails: (String) -> Unit,
	goBack: () -> Unit
) {
	CreateResumeScreen(
		goBack = goBack,
		openResumeDetails = openResumeDetails,
		viewModel = viewModel,
		title = "Изменить резюме",
		submitButtonText = "Пересчитать"
	)
}
