package Ġcom . pe tp oo ja . store . domain . use case Ċ Ċ import Ġcom . pe tp oo ja . store . domain . entities . Cart Products Ċ import Ġcom . pe tp oo ja . store . domain . entities . Categories Ċ import Ġcom . pe tp oo ja . store . domain . entities . Product Ċ import Ġcom . pe tp oo ja . store . domain . repository . Domain Repo Ċ import Ġkotlinx . coroutines . flow . Flow Ċ import Ġjavax . inject . Inject Ċ Ċ class ĠProduct UseCase Ġ@ Inject Ġconstructor ( val Ġrepository : ĠDomain Repo ) Ġ{ ĊĊĠĠĠ Ġfun Ġget Products ( category : ĠString ?): ĠFlow < ArrayList < Product > ?> Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn Ġrepository . get Products ( category ) ĊĠĠĠ Ġ} ĊĊĊĠĠĠ Ġfun Ġadd Product ( product : ĠProduct ): ĠFlow < String > Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn Ġrepository . addTo Cart ( product ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun Ġremove Product ( product : ĠProduct ) Ġ: ĠFlow < String > Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn Ġrepository . remove From Cart ( product ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun Ġdelete Product ( product : ĠProduct ) Ġ: ĠFlow < String > Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn Ġrepository . delete From DB ( product ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun Ġdelete All () Ġ: ĠFlow < Cart Products ?> Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn Ġrepository . delete All () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun Ġget From Cart (): ĠFlow < Cart Products ?> Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn Ġrepository . getAll From Cart () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun Ġget Categories (): ĠFlow < Categories > Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn Ġrepository . getC ategories () ĊĠĠĠ Ġ} Ċ }