package Ġcom . mal ik ane . m uss ic . ViewModel čĊč Ċ import Ġandroid . app . Application č Ċ import Ġandroidx . lifecycle . Android ViewModel č Ċ import Ġandroidx . lifecycle . LiveData č Ċ import Ġcom . mal ik ane . m uss ic . Database . Music č Ċ import Ġcom . mal ik ane . m uss ic . Database . Playlist Base č Ċ import Ġcom . mal ik ane . m uss ic . ViewModel . Repository . Playlist Repository čĊč Ċ class ĠPlaylist ViewModel ( application : ĠApplication ): Android ViewModel ( application ){ čĊĠĠĠ Ġprivate Ġvar Ġrepository : Playlist Repository = ĠPlaylist Repository ( application ) čĊĠĠĠ Ġprivate Ġvar Ġall Playlist : LiveData < List < Playlist Base >> ?= repository . getAll Playlist () čĊčĊĠĠĠ Ġfun Ġcreate Playlist ( playlist Base : ĠPlaylist Base )= repository . create Playlist ( playlist Base ) čĊčĊĠĠĠ Ġfun Ġupdate Playlist ( playlist Base : ĠPlaylist Base )= repository . update Playlist ( playlist Base ) čĊčĊĠĠĠ Ġfun Ġdelete Playlist ( playlist Base : ĠPlaylist Base )= repository . delete Playlist ( playlist Base ) čĊčĊĠĠĠ Ġfun ĠgetAll Playlist (): LiveData < List < Playlist Base >> ? { čĊĠĠĠĠĠĠĠ Ġreturn Ġrepository . getAll Playlist () čĊĠĠĠ Ġ} č Ċ }