package Ġcom . example . ny tc lean arc itecture . base Ċ Ċ import Ġandroidx . h ilt . lifecycle . ViewModel Inject Ċ import Ġandroidx . lifecycle . Lifecycle Observer Ċ import Ġandroidx . lifecycle . Lifecycle Owner Ċ import Ġandroidx . lifecycle . ViewModel Ċ import Ġcom . example . ny tc lean arc itecture . base . extension . event Ċ Ċ open Ġclass ĠBase ViewModel < N Ġ: ĠNavigation > Ġ@ ViewModel Inject Ġconstructor () Ġ: ĠViewModel (), ĠLifecycle Observer Ġ{ ĊĊĠĠĠ Ġprotected Ġval Ġnavigation Event Ġ= Ġevent < N >() ĊĊĠĠĠ Ġfun Ġobserve Navigation ( owner : ĠLifecycle Owner , Ġobserver : Ġ( N ) Ġ-> ĠUnit ) Ġ= ĊĠĠĠĠĠĠĠ Ġnavigation Event . observe ( owner , Ġobserver ) Ċ } Ċ