package Ġcom . alg ol ia . instant search . compose . filter . facet . dynamic . internal Ċ Ċ import Ġandroidx . compose . runtime . getValue Ċ import Ġandroidx . compose . runtime . mutable State Of Ċ import Ġandroidx . compose . runtime . setValue Ċ import Ġcom . alg ol ia . instant search . compose . filter . facet . dynamic . Dynamic Facet List State Ċ import Ġcom . alg ol ia . instant search . helper . filter . facet . dynamic . Attribut ed Fac ets Ċ import Ġcom . alg ol ia . instant search . helper . filter . facet . dynamic . Selections Per Attribute Ċ import Ġcom . alg ol ia . search . model . Attribute Ċ import Ġcom . alg ol ia . search . model . search . Facet Ċ Ċ /** Ċ Ġ* Ġ[ Dynamic Facet List State ] Ġimplementation . Ċ Ġ* Ċ Ġ* Ġ@ param Ġordered Fac ets Ġlist Ġof Ġattribut ed Ġfac ets Ġto Ġpresent Ċ Ġ* Ġ@ param Ġselections Ġmapping Ġbetween Ġa Ġfacet Ġattribute Ġand Ġa Ġset Ġof Ġselected Ġfacet Ġvalues Ċ Ġ*/ Ċ internal Ġclass ĠDynamic Facet List State Impl ( ĊĠĠĠ Ġordered Fac ets : ĠList < Attribut ed Fac ets > Ġ= Ġempty List (), ĊĠĠĠ Ġselections : ĠSelection s Per Attribute Ġ= Ġempty Map () Ċ ) Ġ: ĠDynamic Facet List State Ġ{ ĊĊĠĠĠ Ġ@ set : Jvm Name ("_ selections ") ĊĠĠĠ Ġoverride Ġvar Ġselections : ĠSelection s Per Attribute Ġby Ġmutable State Of ( selections ) ĊĊĠĠĠ Ġ@ set : Jvm Name ("_ ordered Fac ets ") ĊĠĠĠ Ġoverride Ġvar Ġordered Fac ets : ĠList < Attribut ed Fac ets > Ġby Ġmutable State Of ( ordered Fac ets ) ĊĊĠĠĠ Ġoverride Ġvar Ġdid Select : Ġ(( Attribute , ĠFac et ) Ġ-> ĠUnit )? Ġ= Ġnull ĊĊĠĠĠ Ġoverride Ġfun Ġset Ordered Fac ets ( facet Order : ĠList < Attribut ed Fac ets >) Ġ{ ĊĠĠĠĠĠĠĠ Ġthis . ordered Fac ets Ġ= Ġfacet Order ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġset Selections ( selections : ĠSelection s Per Attribute ) Ġ{ ĊĠĠĠĠĠĠĠ Ġthis . selections Ġ= Ġselections ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġtoggle ( facet : ĠFac et , Ġattribute : ĠAttribute ) Ġ{ ĊĠĠĠĠĠĠĠ Ġdid Select ?. invoke ( attribute , Ġfacet ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġis Selected ( facet : ĠFac et , Ġattribute : ĠAttribute ): ĠBoolean Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn Ġselections [ attribute ]?. contains ( facet . value ) Ġ== Ġtrue ĊĠĠĠ Ġ} Ċ } Ċ