using CareFusion.Mosaic.Converters.Wwks2.Messages.Input;
using CareFusion.Mosaic.Converters.Wwks2.Types;
using CareFusion.Mosaic.Interfaces.Types.Packs;
using CareFusion.Mosaic.Interfaces.Types.Stock;
using System;

namespace CareFusion.Mosaic.Interfaces.Messages.Input
{
    public interface IInputMessagePack
    {
        /// <summary>
        /// Gets or sets the identifier.
        /// </summary>
        uint Index { get; set; }

        /// <summary>
        /// Internal pack ID. If the pack has not been placed into stock, the value is "0".
        /// </summary>
        ulong Id { get; set; }

        /// <summary>
        /// Stock delivery number for this pack (As specified in the InputRequest).
        /// </summary>
        string DeliveryNumber { get; set; }

        /// <summary>
        /// Batch number of the pack. This attribute is used when the picker has entered a batch number.
        /// </summary>
        string BatchNumber { get; set; }

        /// <summary>
        /// External ID specified in the InputResponse and saved for this pack.
        /// </summary>
        string ExternalId { get; set; }

        /// <summary>
        /// Serial number of the pack.
        /// </summary>
        string SerialNumber { get; set; }

        /// <summary>
        /// Expiration date of the pack in format YYYY-MM-DD.
        /// </summary>
        string ExpiryDate { get; set; }

        /// <summary>
        /// Source if Expiration date of the pack
        /// </summary>
        ExpiryDateSource ExpiryDateSource { get; set; }

        /// <summary>
        /// Input date of the pack in format YYYY-MM-DD.
        /// </summary>
        string StockInDate { get; set; }

        /// <summary>
        /// Barcode of the pack being placed into stock. This code is checked by the pharmacy IT system and compared against internal data.
        /// Based on the information contained in the code, the pharmacy IT system can decide whether the pack can be placed into stock.
        /// In case of a datamatrix code scanned, it depends on robot configuration if the attribute contains the full content of the scanned code or just the article identifying part of it.
        /// </summary>
        string ScanCode { get; set; }

        /// <summary>
        /// Number of units (e.g. tablets or ampules) currently inside the pack.
        /// The value "0" means that the pack is full (not opened).
        /// This attribute is used for the stock input of opened packs.
        /// </summary>
        uint SubItemQuantity { get; set; }

        /// <summary>
        /// Depth of the pack in mm.
        /// </summary>
        uint Depth { get; set; }

        /// <summary>
        /// Width of the pack in mm.
        /// </summary>
        uint Width { get; set; }

        /// <summary>
        /// Height of the pack in mm.
        /// </summary>
        uint Height { get; set; }

        /// <summary>
        /// Form factor of the pack. The default value is "Cuboid". "Cylinder" is also supported.
        /// </summary>
        PackShape Shape { get; }

        /// <summary>
        /// Gets a flag whether the pack is stored in a refrigerator.
        /// </summary>
        bool IsInFridge { get; }

        /// <summary>
        /// Status of the pack. This data is required when multiple automatic storage machines are connected.
        /// The default value "Available" means that the pack is currently available for output. "NotAvailable" is also supported.
        /// </summary>
        PackState State { get; }

        /// <summary>
        /// Gets the stock location of the pack.
        /// </summary>
        string StockLocationId { get; }

        /// <summary>
        /// Gets the machine location of the pack.
        /// Is only relevant for multi machine environments.
        /// </summary>
        string MachineLocation { get; }

        /// <summary>
        /// Global unique id of a pack in stock of an ASRS.
        /// </summary>
        Guid GUID { get; set; }

        /// <summary>
        /// Input result follows. This element can occur once per pack.
        /// </summary>
        InputMessagePackHandling Handling { get; set; }
    }
}