package Ġui . new screen . reducer Ċ Ċ import Ġkotlinx . coroutines . Coroutine Scope Ċ import Ġkotlinx . coroutines . flow . Mutable Shared Flow Ċ import Ġkotlinx . coroutines . flow . Mutable State Flow Ċ import Ġui . new screen . New Screen Effect Ċ import Ġui . new screen . New Screen State Ċ import Ġjavax . inject . Inject Ċ Ċ interface ĠCategory Index Changed Reducer Ġ{ ĊĊĠĠĠ Ġoperator Ġfun Ġinvoke ( index : ĠInt ) Ċ } Ċ Ċ class ĠCategory Index Changed Reducer Impl Ġ@ Inject Ġconstructor ( ĊĠĠĠ Ġprivate Ġval Ġstate : ĠMutable State Flow < New Screen State >, ĊĠĠĠ Ġeffect : ĠMutable Shared Flow < New Screen Effect >, ĊĠĠĠ Ġscope : ĠCor outine Scope , Ċ ) Ġ: ĠBase Reducer ( state , Ġeffect , Ġscope ), ĠCategory Index Changed Reducer Ġ{ ĊĊĠĠĠ Ġoverride Ġfun Ġinvoke ( index : ĠInt ) Ġ= Ġpush State Ġ{ ĊĠĠĠĠĠĠĠ Ġcopy ( ĊĠĠĠĠĠĠĠĠĠĠĠ Ġselected Category Ġ= Ġcategories [ index ] ĊĠĠĠĠĠĠĠ Ġ) ĊĠĠĠ Ġ} Ċ } Ċ