using UnityEngine;
using System.Collections;
using FluffyUnderware.DevTools;

namespace FluffyUnderware.Curvy.Generator.Modules
{
    [ModuleInfo("%MENUNAME%",ModuleName="%MODULENAME%", Description="%DESCRIPTION%")]
    public class %CLASSNAME% : CGModule
    {
        
        [HideInInspector]
        [InputSlotInfo(typeof(CGData))]
        public CGModuleInputSlot InData = new CGModuleInputSlot();

        [HideInInspector]
        [OutputSlotInfo(typeof(CGData))]
        public CGModuleOutputSlot OutData = new CGModuleOutputSlot();

        #region ### Serialized Fields ###
        #endregion
        #region ### Public Properties ###

        // Gets whether the module is properly configured i.e. has everything needed to work like intended
        public override bool IsConfigured
        {
            get
            {
                return base.IsConfigured;
            }
        }

        // Gets whether the module and all its dependencies are fully initialized
        public override bool IsInitialized
        {
            get
            {
                return base.IsInitialized;
            }
        }
        
        #endregion

        #region ### Unity Callbacks ###
        /*! \cond UNITY */
        protected override void OnEnable()
        {
            base.OnEnable();
            //Properties.MinWidth = 250;
            //Properties.LabelWidth = 80;
        }

#if UNITY_EDITOR
        protected override void OnValidate()
        {
            base.OnValidate();
        }
#endif

        public override void Reset()
        {
            base.Reset();
        }

        /*! \endcond */
        #endregion

        #region ### Module Overrides ###

        public override void Refresh()
        {
            base.Refresh();
            /* Add Module processing code in here */
        }

        // Called when a module's state changes (Link added/removed, Active toggles etc..)
        //public override void OnStateChange()
        //{
        //    base.OnStateChange();
        //}

        // Called after a module was copied to a template
        //public override void OnTemplateCreated() 
        //{
        //    base.OnTemplateCreated();
        //}

        //Called in multiple situations to clear all the outputs generated by this module. One example is when you click on the "Clear output" button in the Curvy Generator's toolbar
        //public override bool DeleteAllOutputManagedResources()
        //{
        //    return base.DeleteAllOutputManagedResources();
        //}

        #endregion
    }
}