package Ġcom . pat ry kk os ier ad z ki . composer . comp os ables Ċ Ċ import Ġandroidx . compose . runtime . Composable Ċ import Ġandroidx . compose . runtime . getValue Ċ import Ġandroidx . compose . ui . platform . Local Lifecycle Owner Ċ import Ġcom . pat ry kk os ier ad z ki . composer . core .* Ċ import Ġcom . pat ry kk os ier ad z ki . composer . core . Composer . Ui State Render Config . Companion . default Failure Composable Ċ import Ġcom . pat ry kk os ier ad z ki . composer . core . Composer . Ui State Render Config . Companion . default Loading Composable Ċ import Ġcom . pat ry kk os ier ad z ki . composer . core . Composer . Ui State Render Config . Companion . default Retry ing Composable Ċ import Ġcom . pat ry kk os ier ad z ki . composer . core . Composer . Ui State Render Config . Companion . default Success Composable Ċ import Ġcom . pat ry kk os ier ad z ki . composer . core . Composer . Ui State Render Config . Companion . default Swipe Refresh Failure Composable Ċ import Ġcom . pat ry kk os ier ad z ki . composer . core . Composer . Ui State Render Config . Companion . default Swipe Refresh ing Composable Ċ import Ġcom . pat ry kk os ier ad z ki . composer . utils . lifecycle Aware State Ċ Ċ @ Composable Ċ fun Ġ< D Ġ: ĠComposer Ui State Data , ĠVM Ġ: ĠComposer ViewModel < D >> ĠComposer Ui State View ( ĊĠĠĠ ĠviewModel : ĠVM , ĊĠĠĠ Ġrender On Loading : Ġ@ Composable Ġ(( D ) Ġ-> ĠUnit )? Ġ= Ġnull , ĊĠĠĠ Ġrender On Retry ing : Ġ@ Composable Ġ(( D ) Ġ-> ĠUnit )? Ġ= Ġnull , ĊĠĠĠ Ġrender On Swipe Refresh ing : Ġ@ Composable Ġ(( D ) Ġ-> ĠUnit )? Ġ= Ġnull , ĊĠĠĠ Ġrender On Failure : Ġ@ Composable Ġ(( D , Ġerror : ĠThrowable ) Ġ-> ĠUnit )? Ġ= Ġnull , ĊĠĠĠ Ġrender On Swipe Refresh Failure : Ġ@ Composable Ġ(( D , Ġerror : ĠThrowable ) Ġ-> ĠUnit )? Ġ= Ġnull , ĊĠĠĠ Ġrender On Success : Ġ@ Composable Ġ(( data : ĠD ) Ġ-> ĠUnit )? Ġ= Ġnull , Ċ ) Ġ{ ĊĠĠĠ Ġval Ġlifecycle Owner Ġ= ĠLocal Lifecycle Owner . current ĊĠĠĠ Ġval Ġstate Ġby Ġlifecycle Aware State ( ĊĠĠĠĠĠĠĠ Ġlifecycle Owner Ġ= Ġlifecycle Owner , ĊĠĠĠĠĠĠĠ Ġflow Ġ= ĠviewModel . ui State , ĊĠĠĠĠĠĠĠ ĠinitialState Ġ= ĠviewModel . initialState ĊĠĠĠ Ġ) ĊĠĠĠ Ġval Ġstate Data Ġ= Ġstate . getData () ĊĊĠĠĠ Ġwhen Ġ( state ) Ġ{ ĊĠĠĠĠĠĠĠ Ġis ĠComposer Ui State . Loading Ġ-> ĠLoading ( render On Loading , Ġstate Data ) ĊĠĠĠĠĠĠĠ Ġis ĠComposer Ui State . Retry ing Ġ-> ĠRetry ing ( render On Retry ing , Ġstate Data ) ĊĠĠĠĠĠĠĠ Ġis ĠComposer Ui State . Swipe Refresh ing Ġ-> ĠSw ipe Refresh ing ( render On Swipe Refresh ing , Ġstate Data ) ĊĠĠĠĠĠĠĠ Ġis ĠComposer Ui State . Success Ġ-> ĠSuccess ( render On Success , Ġstate Data ) ĊĠĠĠĠĠĠĠ Ġis ĠComposer Ui State . Failure Ġ-> ĠFailure ( render On Failure , Ġstate Data , Ġstate . as Failure . error ) ĊĠĠĠĠĠĠĠ Ġis ĠComposer Ui State . Swipe Refresh Failure Ġ-> ĠSw ipe Refresh Failure ( ĊĠĠĠĠĠĠĠĠĠĠĠ Ġrender On Swipe Refresh Failure , ĊĠĠĠĠĠĠĠĠĠĠĠ Ġstate Data , ĊĠĠĠĠĠĠĠĠĠĠĠ Ġstate . as Swipe Refresh Failure . error ĊĠĠĠĠĠĠĠ Ġ) ĊĠĠĠ Ġ} Ċ } Ċ Ċ @ Composable Ċ private Ġfun Ġ< D Ġ: ĠComposer Ui State Data > ĠLoading ( ĊĠĠĠ Ġrender On Loading : Ġ@ Composable Ġ(( D ) Ġ-> ĠUnit )? Ġ= Ġnull , ĊĠĠĠ Ġui State Data : ĠD Ċ ) Ġ{ ĊĠĠĠ Ġif Ġ( render On Loading Ġ!= Ġnull ) Ġ{ ĊĠĠĠĠĠĠĠ Ġrender On Loading . invoke ( ui State Data ) ĊĠĠĠ Ġ} Ġelse Ġ{ ĊĠĠĠĠĠĠĠ Ġdefault Loading Composable . invoke () ĊĠĠĠ Ġ} Ċ } Ċ Ċ @ Composable Ċ private Ġfun Ġ< D Ġ: ĠComposer Ui State Data > ĠRetry ing ( ĊĠĠĠ Ġrender On Retry ing : Ġ@ Composable Ġ(( D ) Ġ-> ĠUnit )? Ġ= Ġnull , ĊĠĠĠ Ġui State Data : ĠD Ċ ) Ġ{ ĊĠĠĠ Ġif Ġ( render On Retry ing Ġ!= Ġnull ) Ġ{ ĊĠĠĠĠĠĠĠ Ġrender On Retry ing . invoke ( ui State Data ) ĊĠĠĠ Ġ} Ġelse Ġ{ ĊĠĠĠĠĠĠĠ Ġdefault Retry ing Composable . invoke () ĊĠĠĠ Ġ} Ċ } Ċ Ċ @ Composable Ċ private Ġfun Ġ< D Ġ: ĠComposer Ui State Data > ĠSw ipe Refresh ing ( ĊĠĠĠ Ġrender On Swipe Refresh ing : Ġ@ Composable Ġ(( D ) Ġ-> ĠUnit )? Ġ= Ġnull , ĊĠĠĠ Ġui State Data : ĠD Ċ ) Ġ{ ĊĠĠĠ Ġif Ġ( render On Swipe Refresh ing Ġ!= Ġnull ) Ġ{ ĊĠĠĠĠĠĠĠ Ġrender On Swipe Refresh ing . invoke ( ui State Data ) ĊĠĠĠ Ġ} Ġelse Ġ{ ĊĠĠĠĠĠĠĠ Ġdefault Swipe Refresh ing Composable . invoke () ĊĠĠĠ Ġ} Ċ } Ċ Ċ @ Composable Ċ private Ġfun Ġ< D Ġ: ĠComposer Ui State Data > ĠSuccess ( ĊĠĠĠ Ġrender On Success : Ġ@ Composable Ġ(( D ) Ġ-> ĠUnit )? Ġ= Ġnull , ĊĠĠĠ Ġui State Data : ĠD Ċ ) Ġ{ ĊĠĠĠ Ġif Ġ( render On Success Ġ!= Ġnull ) Ġ{ ĊĠĠĠĠĠĠĠ Ġrender On Success . invoke ( ui State Data ) ĊĠĠĠ Ġ} Ġelse Ġ{ ĊĠĠĠĠĠĠĠ Ġdefault Success Composable . invoke () ĊĠĠĠ Ġ} Ċ } Ċ Ċ @ Composable Ċ private Ġfun Ġ< D Ġ: ĠComposer Ui State Data > ĠFailure ( ĊĠĠĠ Ġrender On Failure : Ġ@ Composable Ġ(( D , Ġerror : ĠThrowable ) Ġ-> ĠUnit )? Ġ= Ġnull , ĊĠĠĠ Ġui State Data : ĠD , ĊĠĠĠ Ġerror : ĠThrowable Ċ ) Ġ{ ĊĠĠĠ Ġif Ġ( render On Failure Ġ!= Ġnull ) Ġ{ ĊĠĠĠĠĠĠĠ Ġrender On Failure . invoke ( ui State Data , Ġerror ) ĊĠĠĠ Ġ} Ġelse Ġ{ ĊĠĠĠĠĠĠĠ Ġdefault Failure Composable . invoke ( error ) ĊĠĠĠ Ġ} Ċ } Ċ Ċ @ Composable Ċ private Ġfun Ġ< D Ġ: ĠComposer Ui State Data > ĠSw ipe Refresh Failure ( ĊĠĠĠ Ġrender On Swipe Refresh Failure : Ġ@ Composable Ġ(( D , Ġerror : ĠThrowable ) Ġ-> ĠUnit )? Ġ= Ġnull , ĊĠĠĠ Ġui State Data : ĠD , ĊĠĠĠ Ġerror : ĠThrowable Ċ ) Ġ{ ĊĠĠĠ Ġif Ġ( render On Swipe Refresh Failure Ġ!= Ġnull ) Ġ{ ĊĠĠĠĠĠĠĠ Ġrender On Swipe Refresh Failure . invoke ( ui State Data , Ġerror ) ĊĠĠĠ Ġ} Ġelse Ġ{ ĊĠĠĠĠĠĠĠ Ġdefault Swipe Refresh Failure Composable . invoke ( error ) ĊĠĠĠ Ġ} Ċ } Ċ