package com.gingersoft.gsa.delivery_pick_mode.model.factory

import androidx.lifecycle.ViewModel
import androidx.lifecycle.ViewModelProvider
import com.gingersoft.gsa.delivery_pick_mode.data.DeliveryRepository
import com.gingersoft.gsa.delivery_pick_mode.model.viewModel.DeliveryViewModel

class DeliveryFactory(private val repository: DeliveryRepository) : ViewModelProvider.NewInstanceFactory() {

    @Suppress("UNCHECKED_CAST")
    override fun <T : ViewModel?> create(modelClass: Class<T>): T {
        return DeliveryViewModel(repository) as T
    }

}