using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.InformationProtection;

namespace AipGateway.AIP
{
    public enum AipAssignmentMethod
    {
        Standard,
        Privileged,
        Auto,
    }
    public class AipContentLabel
    {
        public AipContentLabel(
            AipLabel label,
            DateTime creationTime,
            AipAssignmentMethod assignmentMethod,
            bool isProtectionAppliedFromLabel)
        {
            this.Label = label;
            this.CreationTime = creationTime;
            this.AssignmentMethod = assignmentMethod;
            this.IsProtectionAppliedFromLabel = isProtectionAppliedFromLabel;
        }

        /// <summary>The actual label object applied on the content.</summary>
        public AipLabel Label { get; private set; }

        /// <summary>The creation time of the label.</summary>
        public DateTime CreationTime { get; private set; }

        /// <summary>The assignment method of the label.</summary>
        public AipAssignmentMethod AssignmentMethod { get; private set; }

        /// <summary>
        /// Returns true if protection was applied by the label or not.
        /// </summary>
        public bool IsProtectionAppliedFromLabel { get; private set; }
    }
    public enum AipProtectionType
    {
        /// <summary>Protection was created from a template</summary>
        TemplateBased,
        /// <summary>Protection was created ad hoc</summary>
        Custom,
    }

    public class AipProtectionHandler
    {
        ProtectionDescriptor ProtectionDescriptor { get; }
        string Owner { get; }
        string IssuedTo { get; }
        bool IsIssuedToOwner { get; }
        string ContentId { get; }
        bool UseDeprecatedAlgorithms { get; }
        bool AuditedExtractAllowed { get; }
    }


    public class AipFileInfo
    {
        public AipContentLabel Label;
    }

}
