package Ġcom . architect coders . ar qu itect om ar vel . di Ċ Ċ import Ġandroidx . lifecycle . Saved State Handle Ċ import Ġcom . architect coders . ar qu itect om ar vel . ui . common . EXTRA _ SELECTED _ CHARACTER Ċ import Ġcom . architect coders . ar qu itect om ar vel . ui . detail . Get Com ics Interactor Ċ import Ġcom . architect coders . data . repository . Mar vel Repository Ċ import Ġcom . architect coders . use cases .* Ċ import Ġdagger . Module Ċ import Ġdagger . Provides Ċ import Ġdagger . h ilt . Install In Ċ import Ġdagger . h ilt . android . components . ViewModel Component Ċ import Ġdagger . h ilt . android . scopes . ViewModel Scoped Ċ import Ġjavax . inject . Named Ċ Ċ @ Module Ċ @ Install In ( ViewModel Component :: class ) Ċ class ĠCharacter Detail Module Ġ{ ĊĊĠĠĠ Ġ@ ViewModel Scoped ĊĠĠĠ Ġ@ Provides ĊĠĠĠ Ġ@ Named (" character Id ") ĊĠĠĠ Ġfun Ġcharacter Id Provider ( state Handle : ĠSaved State Handle ): ĠInt Ġ= ĊĠĠĠĠĠĠĠ Ġstate Handle [ EXTRA _ SELECTED _ CHARACTER ] ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ?: Ġthrow ĠIllegalStateException (" Character ĠID Ġnot Ġfound Ġin Ġthe ĠState ĠHandle ") ĊĊĠĠĠ Ġ@ ViewModel Scoped ĊĠĠĠ Ġ@ Provides ĊĠĠĠ Ġfun Ġget Local Character ById Provider ( mar vel Repository : ĠMar vel Repository ): ĠGet Local Character ById Ġ= ĊĠĠĠĠĠĠĠ ĠGet Local Character ById ( mar vel Repository ) ĊĊĠĠĠ Ġ@ ViewModel Scoped ĊĠĠĠ Ġ@ Provides ĊĠĠĠ Ġfun Ġis Local Character Favorite Provider ( mar vel Repository : ĠMar vel Repository ): ĠIs Local Character Favorite Ġ= ĊĠĠĠĠĠĠĠ ĠIs Local Character Favorite ( mar vel Repository ) ĊĊĠĠĠ Ġ@ ViewModel Scoped ĊĠĠĠ Ġ@ Provides ĊĠĠĠ Ġfun Ġinsert Local Favorite Character Provider ( mar vel Repository : ĠMar vel Repository ): ĠInsert Local Favorite Character Ġ= ĊĠĠĠĠĠĠĠ ĠInsert Local Favorite Character ( mar vel Repository ) ĊĊĠĠĠ Ġ@ ViewModel Scoped ĊĠĠĠ Ġ@ Provides ĊĠĠĠ Ġfun Ġdelete Local Favorite Character Provider ( mar vel Repository : ĠMar vel Repository ): ĠDelete Local Favorite Character Ġ= ĊĠĠĠĠĠĠĠ ĠDelete Local Favorite Character ( mar vel Repository ) Ċ } Ċ Ċ @ Module Ċ @ Install In ( ViewModel Component :: class ) Ċ class ĠCharacter Detail Module For Com ic Interactor Ġ{ ĊĊĠĠĠ Ġ@ ViewModel Scoped ĊĠĠĠ Ġ@ Provides ĊĠĠĠ Ġfun Ġget Remote Com ics From Character Id Provider ( mar vel Repository : ĠMar vel Repository ): ĠGet Remote Com ics From Character Id Ġ= ĊĠĠĠĠĠĠĠ ĠGet Remote Com ics From Character Id ( mar vel Repository ) ĊĊĠĠĠ Ġ@ ViewModel Scoped ĊĠĠĠ Ġ@ Provides ĊĠĠĠ Ġfun Ġinsert Com ics For Character Local Provider ( mar vel Repository : ĠMar vel Repository ): ĠInsert Remote Com ics For Local Character Ġ= ĊĠĠĠĠĠĠĠ ĠInsert Remote Com ics For Local Character ( mar vel Repository ) ĊĊĠĠĠ Ġ@ ViewModel Scoped ĊĠĠĠ Ġ@ Provides ĊĠĠĠ Ġfun Ġget Com ics For Character Provider ( mar vel Repository : ĠMar vel Repository ): ĠGet Com ics For Character Ġ= ĊĠĠĠĠĠĠĠ ĠGet Com ics For Character ( mar vel Repository ) ĊĊĠĠĠ Ġ@ ViewModel Scoped ĊĠĠĠ Ġ@ Provides ĊĠĠĠ Ġfun Ġget Com ics Interactor Provider ( ĊĠĠĠĠĠĠĠ Ġget Remote Com ics From Character Id : ĠGet Remote Com ics From Character Id , ĊĠĠĠĠĠĠĠ Ġinsert Remote Com ics For Local Character : ĠInsert Remote Com ics For Local Character , ĊĠĠĠĠĠĠĠ Ġget Com ics For Character : ĠGet Com ics For Character ĊĠĠĠ Ġ): ĠGet Com ics Interactor Ġ= ĊĠĠĠĠĠĠĠ ĠGet Com ics Interactor ( ĊĠĠĠĠĠĠĠĠĠĠĠ Ġget Remote Com ics From Character Id , ĊĠĠĠĠĠĠĠĠĠĠĠ Ġinsert Remote Com ics For Local Character , ĊĠĠĠĠĠĠĠĠĠĠĠ Ġget Com ics For Character ĊĠĠĠĠĠĠĠ Ġ) Ċ } Ċ