//  
//   Rebex Sample Code License
// 
//   Copyright 2026, REBEX CR s.r.o.
//   All rights reserved.
//   https://www.rebex.net/
// 
//   Permission to use, copy, modify, and/or distribute this software for any
//   purpose with or without fee is hereby granted.
// 
//   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
//   EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
//   OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
//   NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
//   HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
//   WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
//   FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
//   OTHER DEALINGS IN THE SOFTWARE.
// 

using System;

namespace Rebex.Samples
{
    /// <summary>
    /// Miscellaneous constants.
    /// </summary>
    public static class Constants
    {
        /// <summary>
        /// Virtual directory where the sample ZIP archives are stored.
        /// </summary>
        public const string SampleFilesVirtualDirectory = "~/Data";

        /// <summary>
        /// Virtual directory where the images are stored.
        /// </summary>
        public const string ImagesVirtualDirectory = "~/Images";

        /// <summary>
        /// Directory delimiter used within URLs.
        /// </summary>
        public const char UrlPathDelimiter = '/';

    }

    /// <summary>
    /// Page URL parameters.
    /// </summary>
    public static class UrlParameter
    {
        /// <summary>
        /// URL parameter for browsed ZIP filename (relative to <see cref="Constants.SampleFilesVirtualDirectory"/>).
        /// </summary>
        /// <remarks>
        /// Mandatory. If missing, the page throws an <see cref="ArgumentException"/>.
        /// </remarks>
        public const string ArchiveFileName = "archive";

        /// <summary>
        /// URL parameter for a path within the archive.
        /// </summary>
        /// <remarks>
        /// Optional (if empty, root directory is used). 
        /// </remarks>
        public const string Path = "path";

        /// <summary>
        /// URL parameter for command type.
        /// </summary>
        /// <remarks>
        /// Optional (if empty, default command is used).
        /// </remarks>
        public const string Command = "command";
    }

    /// <summary>
    /// Values for <see cref="UrlParameter.Command"/> web page argument.
    /// </summary>
    public static class UrlParameterCommand
    {
        /// <summary>
        /// Lists files and subdirectories of the current directory.<br/>
        /// Default command.
        /// </summary>
        /// <remarks>
        /// The directory should be defined in <see cref="UrlParameter.Path"/>.
        /// </remarks>
        public const string List = "list";

        /// <summary>
        /// Downloads a file.
        /// </summary>
        /// <remarks>
        /// Path to the file should be defined in <see cref="UrlParameter.Path"/>.
        /// </remarks>
        public const string Download = "download";
    }

    /// <summary>
    /// Determines the image to show.
    /// </summary>
    public enum IconType
    {
        File,
        Folder,
        DirectoryUp,
        Close,
    }

}
