package Ġcom . github . y as uk ot elin . ui _ home Ċ Ċ import Ġandroidx . lifecycle . LiveData Ċ import Ġandroidx . lifecycle . Mutable LiveData Ċ import Ġandroidx . lifecycle . ViewModel Ċ import Ġcom . github . y as uk ot elin . model . User Ċ import Ġcom . github . y as uk ot elin . ui _ core . result . Event Ċ import Ġcom . github . y as uk ot elin . use case _ user . User UseCase Ċ import Ġcom . github . y as uk ot elin . use case _ user . User UseCase Impl Ċ Ċ class ĠHome ViewModel Ġ: ĠViewModel (), ĠHome Controller Deleg ation Ġ{ ĊĊĠĠĠ Ġprivate Ġval Ġuser UseCase : ĠUser UseCase Ġby Ġlazy Ġ{ ĠUser UseCase Impl () Ġ} ĊĊĠĠĠ Ġprivate Ġval Ġ_ users : ĠMutable LiveData < List < User >> Ġ= ĠMutable LiveData < List < User >> (). apply Ġ{ ĊĠĠĠĠĠĠĠ Ġthis . post Value ( ĊĠĠĠĠĠĠĠĠĠĠĠ Ġuser UseCase . get Users () ĊĠĠĠĠĠĠĠ Ġ) ĊĠĠĠ Ġ} ĊĠĠĠ Ġval Ġuser : ĠLive Data < List < User >> ĊĠĠĠĠĠĠĠ Ġget () Ġ= Ġ_ users ĊĊĠĠĠ Ġprivate Ġval Ġ_ navigate To User Detail Action : ĠMutable LiveData < Event < Int >> Ġ= ĠMutable LiveData < Event < Int >>() ĊĠĠĠ Ġval Ġnavigate To User Detail Action : ĠLive Data < Event < Int >> ĊĠĠĠĠĠĠĠ Ġget () Ġ= Ġ_ navigate To User Detail Action ĊĊĠĠĠ Ġoverride Ġfun ĠonClick User Card ( id : ĠInt ) Ġ{ ĊĠĠĠĠĠĠĠ Ġ_ navigate To User Detail Action . post Value ( Event ( id )) ĊĠĠĠ Ġ} Ċ } Ċ