using Catel.MVVM;
using CatelSample.ViewModels.Base;
using CatelSample.Views.Services;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CatelSample.ViewModels
{
    public class MainViewModel : ViewModel_Base
    {
        public MainViewModel(CatelSample.IContext context)
            :base(context)
        {
        }

        protected override async Task InitializeAsync()
        {
            //create non closable tab
            await Context.TabService.AddAndActivateAsync<DashboardViewModel>(new DashboardViewModel(Context), false);

            //create closable tabs
            await Context.TabService.AddAndActivateAsync<TestingViewModel>(new TestingViewModel(Context), true);
            await Context.TabService.AddAndActivateAsync<TestingViewModel>(new TestingViewModel(Context), true);
        }
    }
}
