﻿using System.Windows;
using System.ComponentModel;
using System.Collections.Generic;
using Microsoft.Practices.Prism.Commands;
using Microsoft.Practices.Prism.Events;
using Microsoft.Practices.Prism.Interactivity.InteractionRequest;
using Microsoft.Practices.Prism.Regions;
using Microsoft.Practices.ServiceLocation;
using SoftMod.Infrastructure;
using SoftMod.Infrastructure.InteractionRequests;
using SoftMod;
using SoftMod.EnvironmentModule.Views;
using System.Windows.Input;
using System.Windows.Controls;

namespace SoftMod.EnvironmentModule.ViewModels
{
    class EnvironmentCollectionViewModel : Notification, IPopupWindowActionAware, IRegionManagerAware
    {
        // IPopupWindowActionAware implementation
        public Window HostWindow { get; set; }
        // Host notification
        public Notification HostNotification { get; set; }
        // IRegionManagerAware implementation
        public IRegionManager RegionManager { get; set; }
        // Declare variable to hold framework control
        public Framework.Control control { get; private set; }
        /// <summary>
        /// Dictionary collection variable to hold environment objects held within MCP
        /// </summary>
        public Framework.ObservableDictionary<string, Framework.Environment> environmentCollection { get; set; }
        // Selected item
        public object SelectedItem { get; set; }
        /// <summary>
        /// Constructor
        /// </summary>
        public EnvironmentCollectionViewModel()
        {
            // Load framework control
            this.control = Framework.Control._Control;
            // Get environment collection from MCP and store locally
            environmentCollection = control.frameworkControl.MCP.environmentCollection;
        }
    }
}
