package Ġcom . lu is mun yo z . ry la iss cept er . ui . screens . main Ċ Ċ import Ġcom . lu is mun yo z . ry la iss cept er . domain . entity . Base Champ ion Ċ import Ġcom . lu is mun yo z . ry la iss cept er . domain . entity . Champ ion UI Colors Ċ import Ġcom . lu is mun yo z . ry la iss cept er . domain . inter actor . Get Base Champ ions Interactor Ċ import Ġcom . lu is mun yo z . ry la iss cept er . domain . inter actor . Update Base Champ ion Interactor Ċ import Ġcom . lu is mun yo z . ry la iss cept er . domain . inter actor . base . Bus Ċ import Ġcom . lu is mun yo z . ry la iss cept er . domain . inter actor . base . Interactor Executor Ċ import Ġcom . lu is mun yo z . ry la iss cept er . domain . inter actor . event . Champ ions Event Ċ import Ġcom . lu is mun yo z . ry la iss cept er . ui . entity . UI Base Champ ion Ċ import Ġcom . lu is mun yo z . ry la iss cept er . ui . entity . mapper . UI Champ ion Data Mapper Ċ Ċ /** Ċ Ġ* ĠCreated Ġby Ġll co Ġon Ġ 1 1 / 0 9 / 2 0 1 7 . Ċ Ġ*/ Ċ class ĠMain Presenter ( val Ġview : ĠMain Contract . View , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġoverride Ġval Ġbus : ĠBus , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġval Ġget Base Champ ions Interactor : ĠGet Base Champ ions Interactor , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġval Ġstore Base Champ ion Interactor : ĠUpdate Base Champ ion Interactor , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġval Ġinter actor Executor : ĠInter actor Executor , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġval Ġui Champ ion Data Mapper : ĠUI Champ ion Data Mapper ) Ġ: ĠMain Contract . Presenter Ġ{ ĊĊĠĠĠ Ġlateinit Ġvar Ġbase Champ ions : ĠList < Base Champ ion > ĊĊĠĠĠ Ġfun Ġstart () Ġ{ ĊĠĠĠĠĠĠĠ Ġdownload Champ ions () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun Ġdownload Champ ions () Ġ{ ĊĠĠĠĠĠĠĠ Ġinter actor Executor . execute ( getBase Champ ions Interactor ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun Ġon Event ( event : ĠCh amp ions Event ) Ġ{ ĊĠĠĠĠĠĠĠ Ġthis . base Champ ions Ġ= Ġevent . base Champ ions ĊĠĠĠĠĠĠĠ Ġview . populate Items ( ui Champ ion Data Mapper . transform ( base Champ ions )) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġon Champ ion Pressed ( champ ion Id : ĠString ) Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġchamp ion Ġ= Ġbase Champ ions . first Ġ{ Ġit . id . equals ( champ ion Id ) Ġ} ĊĠĠĠĠĠĠĠ Ġview . goTo Champ ion Details ( ui Champ ion Data Mapper . transform ( champ ion )) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġupdate Champ ion ( ui Base Champ ion : ĠUI Base Champ ion ) Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġchamp ion Ġ= Ġbase Champ ions . first Ġ{ Ġit . id . equals ( ui Base Champ ion . id ) Ġ} ĊĠĠĠĠĠĠĠ Ġui Base Champ ion . colors ?. let Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġchamp ion . colors Ġ= Ġui Champ ion Data Mapper . transform ( it ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġstore Base Champ ion Interactor . base Champ ion Ġ= Ġchamp ion ĊĠĠĠĠĠĠĠĠĠĠĠ Ġinter actor Executor . execute ( store Base Champ ion Interactor ) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} Ċ Ċ }