package Ġio . nova foundation . nova . feature _ staking _ impl . presentation . staking . controller . set Ċ Ċ import Ġandroid . os . Bundle Ċ import Ġandroid . view . LayoutInflater Ċ import Ġandroid . view . View Ċ import Ġandroid . view . ViewGroup Ċ import Ġio . nova foundation . nova . common . base . Base Fragment Ċ import Ġio . nova foundation . nova . common . di . Feature Utils Ċ import Ġio . nova foundation . nova . common . mixin . impl . observe Valid ations Ċ import Ġio . nova foundation . nova . common . utils . apply StatusBar Insets Ċ import Ġio . nova foundation . nova . common . utils . setVisible Ċ import Ġio . nova foundation . nova . feature _ account _ api . pres en at ation . account . cho oser . Account Chooser Bottom Sheet Dialog Ċ import Ġio . nova foundation . nova . feature _ account _ api . pres en at ation . actions . setup External Actions Ċ import Ġio . nova foundation . nova . feature _ staking _ api . di . St aking Feature Api Ċ import Ġio . nova foundation . nova . feature _ staking _ impl . R Ċ import Ġio . nova foundation . nova . feature _ staking _ impl . di . St aking Feature Component Ċ import Ġkotlinx . android . synt hetic . main . fragment _ set _ controller _ account . confirm Set Controller Container Ċ import Ġkotlinx . android . synt hetic . main . fragment _ set _ controller _ account . set Controller Ad vertisement Ċ import Ġkotlinx . android . synt hetic . main . fragment _ set _ controller _ account . set Controller Continue Ċ import Ġkotlinx . android . synt hetic . main . fragment _ set _ controller _ account . set Controller Controller Ċ import Ġkotlinx . android . synt hetic . main . fragment _ set _ controller _ account . set Controller St ash Ċ import Ġkotlinx . android . synt hetic . main . fragment _ set _ controller _ account . set Controller Switch To St ash Warning Ċ import Ġkotlinx . android . synt hetic . main . fragment _ set _ controller _ account . set Controller Toolbar Ċ Ċ class ĠSet Controller Fragment Ġ: ĠBase Fragment < Set Controller ViewModel >() Ġ{ ĊĊĠĠĠ Ġoverride Ġfun ĠonCreate View ( ĊĠĠĠĠĠĠĠ Ġinflater : ĠLayoutInflater , ĊĠĠĠĠĠĠĠ Ġcontainer : ĠViewGroup ?, ĊĠĠĠĠĠĠĠ ĠsavedInstanceState : ĠBundle ?, ĊĠĠĠ Ġ): ĠView ? Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn Ġinflater . inflate ( R . layout . fragment _ set _ controller _ account , Ġcontainer , Ġfalse ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġinit Views () Ġ{ ĊĠĠĠĠĠĠĠ Ġconfirm Set Controller Container . apply StatusBar Insets () ĊĊĠĠĠĠĠĠĠ Ġset Controller Continue . setOnClickListener Ġ{ ĠviewModel . continue Clicked () Ġ} ĊĠĠĠĠĠĠĠ Ġset Controller Continue . prepare For Progress ( view Lifecycle Owner ) ĊĊĠĠĠĠĠĠĠ Ġset Controller St ash . setOnClickListener Ġ{ ĠviewModel . stash Clicked () Ġ} ĊĠĠĠĠĠĠĠ Ġset Controller Controller . setOnClickListener Ġ{ ĠviewModel . controller Clicked () Ġ} ĊĊĠĠĠĠĠĠĠ Ġset Controller Ad vertisement . setOn Learn More Clicked Listener Ġ{ ĠviewModel . on More Clicked () Ġ} ĊĠĠĠĠĠĠĠ Ġset Controller Toolbar . set Home Button Listener Ġ{ ĠviewModel . back Clicked () Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġinject () Ġ{ ĊĠĠĠĠĠĠĠ ĠFeature Utils . get Feature < St aking Feature Component >( ĊĠĠĠĠĠĠĠĠĠĠĠ Ġrequire Context (), ĊĠĠĠĠĠĠĠĠĠĠĠ ĠSt aking Feature Api :: class . java ĊĠĠĠĠĠĠĠ Ġ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. set Controller Factory () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. create ( this ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. inject ( this ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġsubscribe ( viewModel : ĠSet Controller ViewModel ) Ġ{ ĊĠĠĠĠĠĠĠ Ġobserve Valid ations ( viewModel ) ĊĠĠĠĠĠĠĠ Ġsetup External Actions ( viewModel ) ĊĊĠĠĠĠĠĠĠ ĠviewModel . stash Account Model . observe ( set Controller St ash :: set Address Model ) ĊĠĠĠĠĠĠĠ ĠviewModel . controller Account Model . observe ( set Controller Controller :: set Address Model ) ĊĊĠĠĠĠĠĠĠ ĠviewModel . choose Controller Action . await able Action LiveData . observe Event Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ ĠAccount Chooser Bottom Sheet Dialog ( ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġcontext Ġ= Ġrequire Context (), ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġpayload Ġ= Ġit . payload , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠonSuccess Ġ= Ġit . on Success , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġon Cancel Ġ= Ġit . on Cancel , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġtitle Ġ= ĠR . string . staking _ controller _ account ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ). show () ĊĠĠĠĠĠĠĠ Ġ} ĊĊĠĠĠĠĠĠĠ ĠviewModel . able To Change Controller . observe Ġ{ Ġable To Change Controller Ġ-> ĊĠĠĠĠĠĠĠĠĠĠĠ Ġval Ġcontroller View Action Ġ= ĠR . drawable . ic _ chevron _ down . take If Ġ{ Ġable To Change Controller Ġ} ĊĠĠĠĠĠĠĠĠĠĠĠ Ġset Controller Controller . setAction Icon ( controller View Action ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġset Controller Controller . isEnabled Ġ= Ġable To Change Controller ĊĊĠĠĠĠĠĠĠĠĠĠĠ Ġset Controller Switch To St ash Warning . setVisible (! able To Change Controller ) ĊĠĠĠĠĠĠĠ Ġ} ĊĊĠĠĠĠĠĠĠ ĠviewModel . continue Button State . observe ( set Controller Continue :: setState ) ĊĠĠĠ Ġ} Ċ } Ċ