package Ġio . tv _ series _ paging _ library . di Ċ Ċ import Ġandroid . content . Context Ċ import Ġandroidx . appcompat . app . AppCompatActivity Ċ import Ġandroidx . lifecycle . ViewModel Provider Ċ import Ġio . tv _ series _ paging _ library . data . remote . TV Series Remote DataSource Ċ import Ġio . tv _ series _ paging _ library . data . remote . getService Ċ import Ġio . tv _ series _ paging _ library . data . repository . TV Series Repository Ċ import Ġio . tv _ series _ paging _ library . data . room . TV Series Database Ċ import Ġio . tv _ series _ paging _ library . data . room . TV Series Room DataSource Ċ import Ġio . tv _ series _ paging _ library . view model . TV Series ViewModel Ċ import Ġio . tv _ series _ paging _ library . view model . TV Series ViewModel Factory Ċ Ċ private Ġfun Ġprovide TV Series Database ( context : ĠContext ): ĠTV Series Room DataSource Ġ= ĊĠĠĠĠĠĠĠ ĠTV Series Room DataSource ( TV Series Database . getInstance ( context ). tv Series Dao ()) Ċ Ċ private Ġfun Ġprovide TV Series Repository ( context : ĠContext ) Ġ= ĊĠĠĠĠĠĠĠ ĠTV Series Repository ( TV Series Remote DataSource ( getService ()), Ġprovide TV Series Database ( context )) Ċ Ċ private Ġfun Ġprovide TV Series ViewModel Factory ( context : ĠContext ): ĠViewModel Provider . Factory Ġ= ĊĠĠĠĠĠĠĠ ĠTV Series ViewModel Factory ( provide TV Series Repository ( context )) Ċ Ċ fun Ġprovide TV Series ViewModel ( app Compat Activity : ĠAppCompatActivity ) Ġ= ĊĠĠĠĠĠĠĠ ĠViewModel Provider ( app Compat Activity , Ġprovide TV Series ViewModel Factory ( app Compat Activity )). get ( TV Series ViewModel :: class . java ) ĊĊ