package Ġru . a as mc . wh ish list Ċ Ċ import Ġandroidx . lifecycle . LiveData Ċ import Ġandroidx . lifecycle . ViewModel Ċ import Ġru . a as mc . wh ish list . persistence . Repository Ċ Ċ class ĠMain ViewModel ( private Ġval Ġrepository : ĠRepository ) Ġ: ĠViewModel () Ġ{ ĊĊĠ Ġfun Ġsave New List ( name : ĠString ) Ġ{ ĊĠĠĠĠĠ Ġrepository . save Wish list ( Wish list ( name , ĠlistOf ())) ĊĠ Ġ} ĊĊĠ Ġfun Ġget Wish lists (): ĠLive Data < List < Wish list >> Ġ{ ĊĠĠĠ Ġreturn Ġrepository . get Wish lists () ĊĠ Ġ} Ċ }