package Ġcom . n istr uct . sport stat . repository . team Ċ Ċ import Ġcom . n istr uct . sport stat . api . Ret rofit Instance Ċ import Ġcom . n istr uct . sport stat . data . map pers . Team Response To Team Mapper Ċ import Ġcom . n istr uct . sport stat . data . models . api _ models . team . Post Team RequestBody Ċ import Ġcom . n istr uct . sport stat . data . models . ui _ models . Team Ċ import Ġkotlinx . coroutines . flow . Flow Ċ import Ġkotlinx . coroutines . flow . flow Ċ import Ġkotlinx . coroutines . flow . map Ċ import Ġjavax . inject . Inject Ċ Ċ class ĠTeam Repository Impl Ċ @ Inject Ċ constructor ( ĊĠĠĠ Ġprivate Ġval Ġteam Response To Team Mapper : ĠTeam Response To Team Mapper Ċ ) Ġ: Team Repository Ġ{ ĊĠĠĠ Ġoverride Ġsuspend Ġfun Ġget Teams () = flow Ġ{ ĊĠĠĠĠĠĠĠ Ġemit ( Ret rofit Instance . team Api . get Teams ()) ĊĠĠĠ Ġ} ĊĠĠĠĠĠĠĠ Ġ. map Ġ{ Ġteam Response List Ġ-> ĊĠĠĠĠĠĠĠĠĠĠĠ Ġteam Response List . filter Ġ{ Ġteam Response List . isNotEmpty () Ġ} ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. map Ġ{ Ġteam Response Ġ-> ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġteam Response To Team Mapper . map ( team Response ) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġsuspend Ġfun Ġpost Team ( logo : ĠString , Ġname : ĠString ) Ġ= Ġflow Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġpost Team Request Ġ= ĠPost Team RequestBody ( ĊĠĠĠĠĠĠĠĠĠĠĠ Ġlogo , name ĊĠĠĠĠĠĠĠ Ġ) ĊĊĠĠĠĠĠĠĠ Ġemit ( Ret rofit Instance . team Api . post Team ( post Team Request )) ĊĠĠĠ Ġ} ĊĠĠĠĠĠĠĠ Ġ. map Ġ{ Ġ Ġteam Response -> ĊĠĠĠĠĠĠĠĠĠĠĠ Ġteam Response To Team Mapper . map ( team Response ) ĊĠĠĠĠĠĠĠ Ġ} Ċ }