using <#ProductName>.Map.<#KeyName>;
using XGame.Framework.Components;
using XGame.Framework.Map;
using XGame.Framework.ObjectCollection;

namespace <#ProductName>.Map
{
    public static partial class MapKeys
    {
        private static MapKey _<#KeyName>;
        public static MapKey <#KeyName> => _<#KeyName> ??= new MapKey("<#KeyName>", typeof(<#KeyName>View));
    }

    public class <#KeyName>View : MapView<<#KeyName>VM>, I<#ComponentName>Context
    {

        protected override void AddComponent(IComponentGroup group)
        {
            group.Add(new <#ComponentName>Component());
        }

        protected override <#KeyName>VM CtreatViewModel(IObjectCollector collector)
        {
            return new <#KeyName>VM(collector);
        }

        protected override void OnDispose()
        {
        }
    }
}
