using Avalonia.Controls; using Prism.Ioc; using Ursa.Controls; using Ursa.Controls.Options; namespace Ursa.PrismExtension; public class UrsaDrawerService(IContainerExtension container): IUrsaDrawerService { public void Show(string viewName, object? vm, string? hostId = null, DrawerOptions? options = null) { var v = container.Resolve(UrsaDialogServiceExtension.UrsaDialogViewPrefix + viewName); Drawer.Show(v, vm, hostId, options); } public void ShowCustom(string viewName, object? vm, string? hostId = null, DrawerOptions? options = null) { var v = container.Resolve(UrsaDialogServiceExtension.UrsaDialogViewPrefix + viewName); Drawer.ShowCustom(v, vm, hostId, options); } public Task ShowModal(string viewName, object? vm, string? hostId = null, DrawerOptions? options = null) { var v = container.Resolve(UrsaDialogServiceExtension.UrsaDialogViewPrefix + viewName); return Drawer.ShowModal(v, vm, hostId, options); } public Task ShowCustomModal(string viewName, object? vm, string? hostId = null, DrawerOptions? options = null) { var v = container.Resolve(UrsaDialogServiceExtension.UrsaDialogViewPrefix + viewName); return Drawer.ShowCustomModal(v, vm, hostId, options); } }