package Ġcom . av iation data . features . search Ċ Ċ import Ġandroidx . fragment . app . Fragment Ċ import Ġandroidx . lifecycle . ViewModel Ċ import Ġandroidx . lifecycle . ViewModel Provider Ċ import Ġcom . av iation data . common . core . dependencies . Dependencies Util Ċ import Ġcom . av iation data . common . core . dependencies . core Component Ċ import Ġcom . av iation data . common . core . structure . App Dispatch ers Ċ import Ġcom . av iation data . common . core . structure . ViewModel Handler Ċ import Ġcom . av iation data . features . search . business . Search Business Ċ import Ġcom . av iation data . features . search . data . Search Remote Repository Ċ import Ġcom . av iation data . features . search . data . Search Service Ċ import Ġcom . av iation data . features . search . view . Search State Ċ import Ġcom . av iation data . features . search . view model . Search Mapper Ċ import Ġcom . av iation data . features . search . view model . Search ViewModel Ċ import Ġorg . kode in . di . K ode in Ċ import Ġorg . kode in . di . conf . Configurable K ode in Ċ import Ġorg . kode in . di . generic . bind Ċ import Ġorg . kode in . di . generic . instance Ċ import Ġorg . kode in . di . generic . provider Ċ import Ġretrofit 2 . Ret rofit Ċ Ċ class ĠSearch ViewModel Factory ( ĊĠĠĠ Ġprivate Ġval Ġbusiness : ĠSearch Business , ĊĠĠĠ Ġprivate Ġval Ġmapper : ĠSearch Mapper , ĊĠĠĠ Ġprivate Ġval Ġdispatch ers : ĠApp Dispatch ers Ċ ) Ġ: ĠViewModel Provider . Factory Ġ{ ĊĊĠĠĠ Ġ@ Suppress (" UN CHECK ED _ CAST ") ĊĠĠĠ Ġoverride Ġfun Ġ< T Ġ: ĠViewModel > Ġcreate ( model Class : ĠClass < T >): ĠT Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn ĠSearch ViewModel ( ĊĠĠĠĠĠĠĠĠĠĠĠ Ġbusiness , ĊĠĠĠĠĠĠĠĠĠĠĠ Ġmapper , ĊĠĠĠĠĠĠĠĠĠĠĠ Ġdispatch ers ĊĠĠĠĠĠĠĠ Ġ) Ġas ĠT ĊĠĠĠ Ġ} Ċ } Ċ Ċ internal Ġval Ġsearch Module Ġ= ĠK ode in . Module (" search ") Ġ{ ĊĊĠĠĠ Ġbind () Ġfrom Ġprovider Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġretrofit Ġ= Ġinstance < Ret rofit >( Dependencies Util . REMOTE _ SOURCE _ OPEN _ SK Y ) ĊĠĠĠĠĠĠĠ Ġval Ġservice Ġ= Ġretrofit . create ( Search Service :: class . java ) ĊĊĠĠĠĠĠĠĠ ĠSearch Remote Repository ( service ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġbind () Ġfrom Ġprovider Ġ{ ĊĠĠĠĠĠĠĠ ĠSearch Business ( instance ()) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġbind () Ġfrom Ġprovider Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġowner Ġ= Ġinstance < Fragment >( Dependencies Util . HOST ) ĊĠĠĠĠĠĠĠ ĠSearch Mapper ( owner . require Context ()) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġbind < ViewModel Handler < Search State >>() Ġwith Ġprovider Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġfactory Ġ= ĠSearch ViewModel Factory ( ĊĠĠĠĠĠĠĠĠĠĠĠ Ġbusiness Ġ= Ġinstance (), ĊĠĠĠĠĠĠĠĠĠĠĠ Ġmapper Ġ= Ġinstance (), ĊĠĠĠĠĠĠĠĠĠĠĠ Ġdispatch ers Ġ= Ġinstance () ĊĠĠĠĠĠĠĠ Ġ) ĊĠĠĠĠĠĠĠ Ġval Ġowner Ġ= Ġinstance < Fragment >( Dependencies Util . HOST ) ĊĊĠĠĠĠĠĠĠ ĠViewModel Provider ( owner , Ġfactory ). get ( Search ViewModel :: class . java ) ĊĠĠĠ Ġ} Ċ } Ċ Ċ internal Ġval Ġsearch Component Ġ= ĠConfigur able K ode in ( mutable Ġ= Ġtrue ). apply Ġ{ ĊĠĠĠ Ġadd Extend ( core Component ) ĊĠĠĠ Ġadd Import ( search Module ) Ċ }