using System;
using System.Collections.Generic;
using System.Windows;
using System.Xml;
using Machinations.Annotations;
using Machinations.FromFlash.graph;

namespace Machinations.UserComponents
{
    public interface IUserComponentSchema 
    {
        IEnumerable<InnerInOut> InnerInOuts { get; }
        Graph Graph { get; set; }
        string Name { get; set; }
        DateTime Created { get; set; }
        int UcId { get; set; }
        UserComponentType Type { get; }
        bool IsZipped { get; }
        InnerInOut CreateInOut(Point position, bool? input = null, int? inOutNumber = null);
        void RemoveInOut(InnerInOut inOut);
        void UnZip();
        void Zip();
        XmlElement GenerateXmlTemplate(XmlDocument document);
        IUserComponentSchema Clone();
        void DeleteXmlTemplate();
        void SaveToComponentsFolder();
        //void AppendToGraph(Graph graph);
        IUserComponentInstance GetNewUcInstance(IUserComponentInstance previousInstance = null);

        IUserComponentInstance GetInstance(int instanceNumber);
        void UpdateOuters();
        IEnumerable<IUserComponentInstance> GetInstances();
        void GenerateNewVersion();
        bool SameSchema(IUserComponentSchema otherSchema);
        IEnumerable<IUserComponentSchema> GetInnerComponents();
    }
}