using System;
using Toolbox.Docking.Api.Control;

namespace Toolbox.Docking.Api.Chemical
{
    /// <summary>
    /// Third party modules SHOULD NOT construct this class. 
    /// All instances of the Chemical class should be constructed via the ITbCalcService's <see cref="ITbWorkTask.CreateChemical(string, out string)"/> method.
    /// </summary>
    [Serializable]
    public sealed class Chemical
    {
        /// <summary>
        /// Constructor for a Toolbox Chemical. <b>DO NOT</b> use this. Use ITbCalcService's <see cref="ITbWorkTask.CreateChemical(string, out string)"/> method instead.
        /// </summary>
        /// <param name="uniqueId">Unique ID for the chemical.</param>
        /// <param name="substanceType">Chemical substance type.</param>
        /// <param name="smiles">Input SMILES.</param>
        public Chemical(Guid uniqueId, ChemicalType substanceType, string smiles)
        {
            UniqueId = uniqueId;
            ChemicalType = substanceType;
            Smiles = smiles;
        }

        /// <summary>
        /// The unique identifier for the chemical.
        /// </summary>
        public Guid UniqueId { get; }

        /// <summary>
        /// The chemical's substance type.
        /// </summary>
        public ChemicalType ChemicalType { get; }

        /// <summary>
        /// Chemical's structure.
        /// </summary>
        public string Smiles { get; }
    }
}