/* Ċ Ġ* ĠCopyright Ġ 2 0 2 1 ĠV ital iy ĠZ ar ub in Ċ Ġ* Ċ Ġ* ĠLicensed Ġunder Ġthe ĠApache ĠLicense , ĠVersion Ġ 2 . 0 Ġ( the Ġ" License "); Ċ Ġ* Ġyou Ġmay Ġnot Ġuse Ġthis Ġfile Ġexcept Ġin Ġcompliance Ġwith Ġthe ĠLicense . Ċ Ġ* ĠYou Ġmay Ġobtain Ġa Ġcopy Ġof Ġthe ĠLicense Ġat Ċ Ġ* Ċ Ġ* ĠĠĠĠ Ġhttp :// www . apache . org / licenses / LICENSE - 2 . 0 Ċ Ġ* Ċ Ġ* ĠUnless Ġrequired Ġby Ġapplicable Ġlaw Ġor Ġagreed Ġto Ġin Ġwriting , Ġsoftware Ċ Ġ* Ġdistributed Ġunder Ġthe ĠLicense Ġis Ġdistributed Ġon Ġan Ġ" AS ĠIS " ĠBASIS , Ċ Ġ* ĠWITHOUT ĠWARRANTIES ĠOR ĠCONDITIONS ĠOF ĠANY ĠKIND , Ġeither Ġexpress Ġor Ġimplied . Ċ Ġ* ĠSee Ġthe ĠLicense Ġfor Ġthe Ġspecific Ġlanguage Ġgoverning Ġpermissions Ġand Ċ Ġ* Ġlimitations Ġunder Ġthe ĠLicense . Ċ Ġ*/ ĊĠ Ċ package Ġcom . key gen qt . demo _ contacts . modules . profile . ui . screens . profile Screen Ċ Ċ import Ġandroidx . compose . material . Experimental Material Api Ċ import Ġandroidx . compose . runtime . Composable Ċ import Ġandroidx . compose . runtime . collect As State Ċ import Ġandroidx . compose . runtime . getValue Ċ import Ġandroidx . compose . ui . Experimental Compose Ui Api Ċ import Ġcom . key gen qt . demo _ contacts . base . Local Base ViewModel Ċ import Ġcom . key gen qt . demo _ contacts . modules ._ common . ui . compose . Error Network Screen Ċ import Ġcom . key gen qt . demo _ contacts . modules . profile . ui . events . Profile Events Ċ import Ġcom . key gen qt . demo _ contacts . modules . profile . ui . view Models . Profile ViewModel Ċ Ċ @ Experimental Material Api Ċ @ Experimental Compose Ui Api Ċ @ Composable Ċ fun ĠProfile Screen ( ĊĠĠĠ ĠviewModel : ĠProfile ViewModel , ĊĠĠĠ Ġon Event : Ġ( Profile Events ) Ġ-> ĠUnit Ġ= Ġ{}, Ċ ) Ġ{ ĊĊĠĠĠ Ġval Ġuser Ġby ĠviewModel . getUser (). collect As State ( false ) ĊĠĠĠ Ġval Ġloading : ĠBoolean Ġby ĠviewModel . loading . collect As State () ĊĠĠĠ Ġval Ġis Login Ġby ĠLocal Base ViewModel . current . is Login . collect As State () ĊĊĠĠĠ ĠProfile Body ( ĊĠĠĠĠĠĠĠ Ġuser Ġ= Ġuser , ĊĠĠĠĠĠĠĠ Ġloading Ġ= Ġloading , ĊĠĠĠĠĠĠĠ Ġis Login Ġ= Ġis Login , ĊĠĠĠĠĠĠĠ Ġon Event Ġ= Ġon Event , ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġif Ġ( viewModel . error Connection . collect As State (). value ) Ġ{ ĊĠĠĠĠĠĠĠ ĠError Network Screen ( loading ) ĊĠĠĠ Ġ} Ċ } ĊĊĊ