using System;
using System.Collections.Generic;
using System.Windows.Media.Media3D;

namespace Earthblend.Tts.Common.Core.Services
{
    public class PresetService
    {
        public const Double InchValue = .083333;
        public Point3D TranslateSize(String strSize)
        {
            Double Width = 0.0D;
            Double Height = 0.0D;
            Double Depth = 0.0D;
            String modifiedSize = strSize.Replace(" ", "");
            IList<String> strs = modifiedSize.Split("x".ToCharArray());
            Double width = Convert.ToDouble(strs[0]);
            Double height = Convert.ToDouble(strs[1]);
            Double depth = Convert.ToDouble(strs[2]);

            switch (modifiedSize)
            {
                case "1x2x2": Width = .75 * InchValue; Height = 1.5 * InchValue; Depth = depth; break;
                case "1x2x4": Width = .75 * InchValue; Height = 1.5 * InchValue; Depth = depth; break;
                case "1x2x6": Width = .75 * InchValue; Height = 1.5 * InchValue; Depth = depth; break;
                case "1x2x8": Width = .75 * InchValue; Height = 1.5 * InchValue; Depth = depth; break;
                case "1x2x10": Width = .75 * InchValue; Height = 1.5 * InchValue; Depth = depth; break;
                case "1x2x12": Width = .75 * InchValue; Height = 1.5 * InchValue; Depth = depth; break;

                case "2x2x2": Width = 1.5 * InchValue; Height = 1.5 * InchValue; Depth = depth; break;
                case "2x2x4": Width = 1.5 * InchValue; Height = 1.5 * InchValue; Depth = depth; break;
                case "2x2x6": Width = 1.5 * InchValue; Height = 1.5 * InchValue; Depth = depth; break;
                case "2x2x8": Width = 1.5 * InchValue; Height = 1.5 * InchValue; Depth = depth; break;
                case "2x2x10": Width = 1.5 * InchValue; Height = 1.5 * InchValue; Depth = depth; break;
                case "2x2x12": Width = 1.5 * InchValue; Height = 1.5 * InchValue; Depth = depth; break;

                case "2x4x2": Width = 1.5 * InchValue; Height = 3.5 * InchValue; Depth = depth; break;
                case "2x4x4": Width = 1.5 * InchValue; Height = 3.5 * InchValue; Depth = depth; break;
                case "2x4x6": Width = 1.5 * InchValue; Height = 3.5 * InchValue; Depth = depth; break;
                case "2x4x8": Width = 1.5 * InchValue; Height = 3.5 * InchValue; Depth = depth; break;
                case "2x4x10": Width = 1.5 * InchValue; Height = 3.5 * InchValue; Depth = depth; break;
                case "2x4x12": Width = 1.5 * InchValue; Height = 3.5 * InchValue; Depth = depth; break;


                case "4x4x2": Width = 3.5 * InchValue; Height = 3.5 * InchValue; Depth = depth; break;
                case "4x4x4": Width = 3.5 * InchValue; Height = 3.5 * InchValue; Depth = depth; break;
                case "4x4x6": Width = 3.5 * InchValue; Height = 3.5 * InchValue; Depth = depth; break;
                case "4x4x8": Width = 3.5 * InchValue; Height = 3.5 * InchValue; Depth = depth; break;
                case "4x4x10": Width = 3.5 * InchValue; Height = 3.5 * InchValue; Depth = depth; break;
                case "4x4x12": Width = 3.5 * InchValue; Height = 3.5 * InchValue; Depth = depth; break;


                case "4x6x2": Width = 3.5 * InchValue; Height = 5.5 * InchValue; Depth = depth; break;
                case "4x6x4": Width = 3.5 * InchValue; Height = 5.5 * InchValue; Depth = depth; break;
                case "4x6x6": Width = 3.5 * InchValue; Height = 5.5 * InchValue; Depth = depth; break;
                case "4x6x8": Width = 3.5 * InchValue; Height = 5.5 * InchValue; Depth = depth; break;
                case "4x6x10": Width = 3.5 * InchValue; Height = 5.5 * InchValue; Depth = depth; break;
                case "4x6x12": Width = 3.5 * InchValue; Height = 5.5 * InchValue; Depth = depth; break;
            }

            return new Point3D(Width, Height, depth);
        }

    }
}