package Ġjp . co . sor am its u . feature _ c rowd loan _ impl . presentation . contribute . confirm Ċ Ċ import Ġandroid . os . Bundle Ċ import Ġandroid . view . LayoutInflater Ċ import Ġandroid . view . View Ċ import Ġandroid . view . ViewGroup Ċ import Ġco il . Image Loader Ċ import Ġdev . chr is ban es . in setter . apply In setter Ċ import Ġjp . co . sor am its u . common . base . Base Fragment Ċ import Ġjp . co . sor am its u . common . di . Feature Utils Ċ import Ġjp . co . sor am its u . common . mixin . impl . observe Browser Events Ċ import Ġjp . co . sor am its u . common . mixin . impl . observe Valid ations Ċ import Ġjp . co . sor am its u . common . utils . setVisible Ċ import Ġjp . co . sor am its u . common . view . set Progress Ċ import Ġjp . co . sor am its u . feature _ account _ api . pres en at ation . actions . setup External Actions Ċ import Ġjp . co . sor am its u . feature _ c rowd loan _ api . di . C rowd loan Feature Api Ċ import Ġjp . co . sor am its u . feature _ c rowd loan _ impl . R Ċ import Ġjp . co . sor am its u . feature _ c rowd loan _ impl . di . C rowd loan Feature Component Ċ import Ġjp . co . sor am its u . feature _ c rowd loan _ impl . presentation . contribute . confirm . parcel . Confirm Contribut e Payload Ċ import Ġkotlinx . android . synt hetic . main . fragment _ contribute _ confirm . confirm Contribut e Amount Ċ import Ġkotlinx . android . synt hetic . main . fragment _ contribute _ confirm . confirm Contribut e Bonus Ċ import Ġkotlinx . android . synt hetic . main . fragment _ contribute _ confirm . confirm Contribut e Confirm Ċ import Ġkotlinx . android . synt hetic . main . fragment _ contribute _ confirm . confirm Contribut e Container Ċ import Ġkotlinx . android . synt hetic . main . fragment _ contribute _ confirm . confirm Contribut e Fee Ċ import Ġkotlinx . android . synt hetic . main . fragment _ contribute _ confirm . confirm Contribut e Le asing Period Ċ import Ġkotlinx . android . synt hetic . main . fragment _ contribute _ confirm . confirm Contribut e Origin A count Ċ import Ġkotlinx . android . synt hetic . main . fragment _ contribute _ confirm . confirm Contribut e Reward Ċ import Ġkotlinx . android . synt hetic . main . fragment _ contribute _ confirm . confirm Contribut e Toolbar Ċ import Ġjavax . inject . Inject Ċ Ċ private Ġconst Ġval ĠKEY _ PAYLOAD Ġ= Ġ" KEY _ PAYLOAD " Ċ Ċ class ĠConfirm Contribut e Fragment Ġ: ĠBase Fragment < Confirm Contribut e ViewModel >() Ġ{ ĊĊĠĠĠ Ġ@ Inject Ġprotected Ġlateinit Ġvar Ġimage Loader : ĠImage Loader ĊĊĠĠĠ Ġcompanion Ġobject Ġ{ ĊĊĠĠĠĠĠĠĠ Ġfun Ġget Bundle ( payload : ĠConfirm Contribut e Payload ) Ġ= ĠBundle (). apply Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġput Parcelable ( KEY _ PAYLOAD , Ġpayload ) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun ĠonCreate View ( ĊĠĠĠĠĠĠĠ Ġinflater : ĠLayoutInflater , ĊĠĠĠĠĠĠĠ Ġcontainer : ĠViewGroup ?, ĊĠĠĠĠĠĠĠ ĠsavedInstanceState : ĠBundle ?, ĊĠĠĠ Ġ): ĠView ? Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn Ġinflater . inflate ( R . layout . fragment _ contribute _ confirm , Ġcontainer , Ġfalse ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġinit Views () Ġ{ ĊĠĠĠĠĠĠĠ Ġconfirm Contribut e Container . apply In setter Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġtype ( status Bars Ġ= Ġtrue ) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġpadding () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ} ĊĊĠĠĠĠĠĠĠĠĠĠĠ Ġconsume ( true ) ĊĠĠĠĠĠĠĠ Ġ} ĊĊĠĠĠĠĠĠĠ Ġconfirm Contribut e Toolbar . set Home Button Listener Ġ{ ĠviewModel . back Clicked () Ġ} ĊĠĠĠĠĠĠĠ Ġconfirm Contribut e Confirm . prepare For Progress ( view Lifecycle Owner ) ĊĠĠĠĠĠĠĠ Ġconfirm Contribut e Confirm . setOnClickListener Ġ{ ĠviewModel . next Clicked () Ġ} ĊĊĠĠĠĠĠĠĠ Ġconfirm Contribut e Origin A count . set Whole ClickListener Ġ{ ĠviewModel . origin Account Clicked () Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġinject () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġpayload Ġ= Ġargument < Confirm Contribut e Payload >(" KEY _ PAYLOAD ") ĊĊĠĠĠĠĠĠĠ ĠFeature Utils . get Feature < C rowd loan Feature Component >( ĊĠĠĠĠĠĠĠĠĠĠĠ Ġrequire Context (), ĊĠĠĠĠĠĠĠĠĠĠĠ ĠC rowd loan Feature Api :: class . java ĊĠĠĠĠĠĠĠ Ġ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. confirm Contribut e Factory () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. create ( this , Ġpayload ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. inject ( this ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġsubscribe ( viewModel : ĠConfirm Contribut e ViewModel ) Ġ{ ĊĠĠĠĠĠĠĠ Ġobserve Browser Events ( viewModel ) ĊĠĠĠĠĠĠĠ Ġobserve Valid ations ( viewModel ) ĊĠĠĠĠĠĠĠ Ġsetup External Actions ( viewModel ) ĊĊĠĠĠĠĠĠĠ ĠviewModel . show Next Progress . observe ( confirm Contribut e Confirm :: set Progress ) ĊĊĠĠĠĠĠĠĠ ĠviewModel . asset Model Flow . observe Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġconfirm Contribut e Amount . set Asset Balance ( it . asset Balance ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġconfirm Contribut e Amount . set Asset Name ( it . token Name ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġconfirm Contribut e Amount . set Asset Image Resource ( it . token Icon Res ) ĊĠĠĠĠĠĠĠ Ġ} ĊĊĠĠĠĠĠĠĠ Ġconfirm Contribut e Amount . amount Input . setText ( viewModel . selected Amount ) ĊĊĠĠĠĠĠĠĠ ĠviewModel . enter ed Fi at Amount Flow . observe Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġit ?. let ( confirm Contribut e Amount :: set Asset Balance Dollar Amount ) ĊĠĠĠĠĠĠĠ Ġ} ĊĊĠĠĠĠĠĠĠ ĠviewModel . fee Flow . observe ( confirm Contribut e Fee :: set Fee Status ) ĊĊĠĠĠĠĠĠĠ Ġwith ( confirm Contribut e Reward ) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġval Ġreward Ġ= ĠviewModel . estimated Reward ĊĊĠĠĠĠĠĠĠĠĠĠĠ Ġset Visible ( reward Ġ!= Ġnull ) ĊĊĠĠĠĠĠĠĠĠĠĠĠ Ġreward ?. let Ġ{ Ġshow Value ( it ) Ġ} ĊĠĠĠĠĠĠĠ Ġ} ĊĊĠĠĠĠĠĠĠ ĠviewModel . c rowd loan Info Flow . observe Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġconfirm Contribut e Le asing Period . show Value ( it . lease Period , Ġit . lease d Until ) ĊĠĠĠĠĠĠĠ Ġ} ĊĊĠĠĠĠĠĠĠ ĠviewModel . selected Address Model Flow . observe Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġconfirm Contribut e Origin A count . setMessage ( it . name Or Address ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġconfirm Contribut e Origin A count . setText Icon ( it . image ) ĊĠĠĠĠĠĠĠ Ġ} ĊĊĠĠĠĠĠĠĠ ĠviewModel . bonus Flow . observe Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġconfirm Contribut e Bonus . setVisible ( it Ġ!= Ġnull ) ĊĊĠĠĠĠĠĠĠĠĠĠĠ Ġit ?. let ( confirm Contribut e Bonus :: show Value ) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} Ċ } Ċ