import Ġmodels . Demand Id Model Ċ import Ġmodels . Demand Model Ċ import Ġmodels . Mp Front Context Ċ import Ġmodels . Tag Id Model Ċ import Ġru . ot us . ot us kotlin . marketplace . transport . k mp . models . demand s .* Ċ Ċ fun ĠM p Front Context . respon ded ( data : ĠM p Response Demand List ) Ġ= Ġapply Ġ{ ĊĠĠĠ Ġdemand s Ġ= Ġdata . demand s ?. map Ġ{ Ġit . to Internal () Ġ} ?. to Mutable List () Ġ?: Ġmutable ListOf () Ċ } Ċ Ċ fun ĠM p Front Context . respon ded ( data : ĠM p Response Demand Create ) Ġ= Ġapply Ġ{ ĊĠĠĠ Ġdemand Ġ= Ġdata . demand ?. to Internal () Ġ?: ĠDem and Model . NONE Ċ } Ċ Ċ fun ĠM p Front Context . respon ded ( data : ĠM p Response Demand Read ) Ġ= Ġapply Ġ{ ĊĠĠĠ Ġdemand Ġ= Ġdata . demand ?. to Internal () Ġ?: ĠDem and Model . NONE Ċ } Ċ Ċ fun ĠM p Front Context . respon ded ( data : ĠM p Response Demand Update ) Ġ= Ġapply Ġ{ ĊĠĠĠ Ġdemand Ġ= Ġdata . demand ?. to Internal () Ġ?: ĠDem and Model . NONE Ċ } Ċ Ċ fun ĠM p Front Context . respon ded ( data : ĠM p Response Demand Delete ) Ġ= Ġapply Ġ{ ĊĠĠĠ Ġif Ġ( data . deleted Ġ== Ġtrue ) Ġ{ ĊĠĠĠĠĠĠĠ Ġdemand Ġ= ĠDem and Model . NONE ĊĠĠĠ Ġ} Ċ } Ċ Ċ fun ĠM p Front Context . respon ded ( data : ĠM p Response Demand Offers ) Ġ= Ġapply Ġ{ ĊĠĠĠ Ġdemand Offers Ġ= Ġdata . demand Pro posals ?. map Ġ{ Ġit . to Internal () Ġ} ?. to Mutable List () Ġ?: Ġmutable ListOf () Ċ } Ċ Ċ fun ĠM p Demand Dto . to Internal () Ġ= ĠDem and Model ( ĊĠĠĠ Ġid Ġ= Ġid ?. let Ġ{ ĠDem and Id Model ( it ) Ġ} Ġ?: ĠDem and Id Model . NONE , ĊĠĠĠ Ġavatar Ġ= Ġavatar Ġ?: Ġ"", ĊĠĠĠ Ġtitle Ġ= Ġtitle Ġ?: Ġ"", ĊĠĠĠ Ġdescription Ġ= Ġdescription Ġ?: Ġ"", ĊĠĠĠ Ġtag Ids Ġ= Ġtag Ids ?. map Ġ{ ĠTag Id Model ( it ) Ġ} ?. to Mutable Set () Ġ?: Ġmutable Set Of (), ĊĠĠĠ Ġtech Det s Ġ= Ġtech Det s ?. map Ġ{ Ġit . to Internal () Ġ} ?. to Mutable Set () Ġ?: Ġmutable Set Of (), Ċ ) Ċ