using System;
using System.Collections.Generic;

using Grasshopper.Kernel;
using Rhino.Geometry;

namespace Workshop.Pyramid
{
    public class GhcDisplayPyramid : GH_Component
    {
        public GhcDisplayPyramid()
            : base("Display Pyramid", "Display Pyramid",
                "Display Pyramid",
                "Workshop", "Pyramid")
        {
        }


        protected override void RegisterInputParams(GH_Component.GH_InputParamManager pManager)
        {
            pManager.AddGenericParameter("Pyramid", "Pyramid", "Pyramid", GH_ParamAccess.item);
        }


        protected override void RegisterOutputParams(GH_Component.GH_OutputParamManager pManager)
        {
            pManager.AddCurveParameter("Display", "Display", "Display", GH_ParamAccess.list);
        }


        protected override void SolveInstance(IGH_DataAccess DA)
        {
            Pyramid iPyramid = null;
            DA.GetData("Pyramid", ref iPyramid);

            DA.SetDataList("Display", iPyramid.ComputeDisplayLines());
        }


        protected override System.Drawing.Bitmap Icon
        {
            get
            {
                return Workshop.Properties.Resources.Icon_PyramidDisplay;
            }
        }


        public override Guid ComponentGuid
        {
            get { return new Guid("{f2a79f30-714d-4ed8-8ed1-1786496ef923}"); }
        }
    }
}