package Ġcom . da res ay . movies . ui . view models Ċ Ċ import Ġandroidx . lifecycle . LiveData Ċ import Ġandroidx . lifecycle . ViewModel Ċ import Ġcom . da res ay . movies . data . api . T mdb Repository Ċ import Ġcom . da res ay . movies . data . models . favorites . Favorite Ċ import Ġcom . da res ay . movies . data . models . movie details . Movie Details Ċ import Ġcom . da res ay . movies . data . models . movie details . Reviews Ċ import Ġcom . da res ay . movies . utils . Resource Ċ import Ġdagger . h ilt . android . lifecycle . H ilt ViewModel Ċ import Ġjavax . inject . Inject Ċ Ċ @ H ilt ViewModel Ċ class ĠMovie Details ViewModel Ġ@ Inject Ġconstructor ( private Ġval Ġrepository : ĠT mdb Repository ) Ġ: ĠViewModel () Ġ{ ĊĠĠĠ Ġfun Ġget Movie Details ( movie Id : ĠInt ) Ġ: ĠLive Data < Resource < Movie Details >> Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn Ġrepository . get Movie Details ( movie Id Ġ= Ġmovie Id ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun Ġget Movie Reviews ( movie Id : ĠInt , Ġpage : ĠInt ) Ġ: ĠLive Data < Resource < Reviews >> Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn Ġrepository . get Movie Reviews ( movie Id , Ġpage ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun Ġset Movie Favorite ( movie Id : ĠInt , Ġfavorite : ĠBoolean ) Ġ{ ĊĠĠĠĠĠĠĠ Ġrepository . set Movie Favorite ( movie Id , Ġfavorite ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun Ġget Favorite ( movie Id : ĠInt ) Ġ: ĠLive Data < Resource < Favorite >> Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn Ġrepository . get Favorite ( movie Id ) ĊĠĠĠ Ġ} Ċ }