// Created with MonoDevelop
//
//    Copyright (C) 2021 Hiperscan GmbH Dresden, Germany
//
//    This program is free software: you can redistribute it and/or modify
//    it under the terms of the GNU General Public License as published by
//    the Free Software Foundation, either version 3 of the License, or
//    (at your option) any later version.
//
//    This program is distributed in the hope that it will be useful,
//    but WITHOUT ANY WARRANTY; without even the implied warranty of
//    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//    GNU General Public License for more details.
//
//    You should have received a copy of the GNU General Public License
//    along with this program.  If not, see <http://www.gnu.org/licenses/>.
//


using Hiperscan.Spectroscopy;

namespace Hiperscan.Spectroscopy.IO
{
    public static class SpectrumFileNames
    {
        private const string FILE_EXTENSION = ".csv";

        public static string GetInternalWhite(Spectrum spectrum)
        {
            return SpectrumFileNames.GetCorrectedSpectrumId(spectrum) +
                                    "_intwhite" +
                                    SpectrumFileNames.FILE_EXTENSION;

        }

        public static string GetInternalWhiteMaster(Spectrum spectrum)
        {
            return SpectrumFileNames.GetCorrectedSpectrumId(spectrum) +
                                    "_intwhitemaster" +
                                    SpectrumFileNames.FILE_EXTENSION;

        }

        public static string GetInternalDark(Spectrum spectrum)
        {
            return SpectrumFileNames.GetCorrectedSpectrumId(spectrum) +
                                    "_intdark" +
                                    SpectrumFileNames.FILE_EXTENSION;

        }

        public static string GetInternalDarkMaster(Spectrum spectrum)
        {
            return SpectrumFileNames.GetCorrectedSpectrumId(spectrum) +
                                    "_intdarkmaster" +
                                    SpectrumFileNames.FILE_EXTENSION;

        }

        public static string GetInternalOxide(Spectrum spectrum)
        {
            return SpectrumFileNames.GetCorrectedSpectrumId(spectrum) +
                                    "_intoxid" +
                                    SpectrumFileNames.FILE_EXTENSION;

        }

        public static string GetExternalBlack(Spectrum spectrum)
        {
            return SpectrumFileNames.GetCorrectedSpectrumId(spectrum) +
                                    "_extblack" +
                                    SpectrumFileNames.FILE_EXTENSION;

        }

        public static string GetExternalWhite(Spectrum spectrum)
        {
            return SpectrumFileNames.GetCorrectedSpectrumId(spectrum) +
                                    "_extwhite" +
                                    SpectrumFileNames.FILE_EXTENSION;

        }

        public static string GetExternalWhiteZenith(Spectrum spectrum)
        {
            return SpectrumFileNames.GetCorrectedSpectrumId(spectrum) +
                                    "_extzenith" +
                                    SpectrumFileNames.FILE_EXTENSION;

        }

        public static string GetExternalWhiteZenithInsert(Spectrum spectrum)
        {
            return SpectrumFileNames.GetCorrectedSpectrumId(spectrum) +
                                    "_zenith_insert" +
                                    SpectrumFileNames.FILE_EXTENSION;

        }

        public static string GetExternalTransflectance(Spectrum spectrum)
        {
            return SpectrumFileNames.GetCorrectedSpectrumId(spectrum) +
                                    "_transflectref" +
                                    SpectrumFileNames.FILE_EXTENSION;

        }

        public static string GetSample(Spectrum spectrum)
        {
            return SpectrumFileNames.GetCorrectedSpectrumId(spectrum) +
                                    "_sample" +
                                    SpectrumFileNames.FILE_EXTENSION;

        }

        public static string GetLabsphere(Spectrum spectrum)
        {
            return SpectrumFileNames.GetCorrectedSpectrumId(spectrum) +
                                    "_labsphere" +
                                    SpectrumFileNames.FILE_EXTENSION;

        }

        public static string GetFix2GlassWhite(Spectrum spectrum)
        {
            return SpectrumFileNames.GetCorrectedSpectrumId(spectrum) +
                                    "_fix2glass_white" +
                                    SpectrumFileNames.FILE_EXTENSION;
        }

        public static string GetFix2GlassBlack(Spectrum spectrum)
        {
            return SpectrumFileNames.GetCorrectedSpectrumId(spectrum) +
                                    "_fix2glass_black" +
                                    SpectrumFileNames.FILE_EXTENSION;
        }

        public static string GetFix2GlassOxid(Spectrum spectrum)
        {
            return SpectrumFileNames.GetCorrectedSpectrumId(spectrum) +
                                    "_fix2glass_oxid" +
                                    SpectrumFileNames.FILE_EXTENSION;
        }

        public static string GetFix2GlassDark(Spectrum spectrum)
        {
            return SpectrumFileNames.GetCorrectedSpectrumId(spectrum) +
                                    "_fix2glass_dark" +
                                    SpectrumFileNames.FILE_EXTENSION;
        }

        public static string GetFix2GlassDarkMaster(Spectrum spectrum)
        {
            return SpectrumFileNames.GetCorrectedSpectrumId(spectrum) +
                                    "_fix2glass_darkmaster" +
                                    SpectrumFileNames.FILE_EXTENSION;
        }

        public static string GetFix2GlassBlackMaster(Spectrum spectrum)
        {
            return SpectrumFileNames.GetCorrectedSpectrumId(spectrum) +
                                    "_fix2glass_blackmaster" +
                                    SpectrumFileNames.FILE_EXTENSION;
        }

        private static string GetCorrectedSpectrumId(Spectrum spectrum)
        {
            return spectrum.Id.Remove(0, 2);
        }
    }
}
