package View.MainFrame;

import java.awt.Image;
import java.awt.image.BufferedImage;

import java.io.File;
import java.io.IOException;

import javax.imageio.ImageIO;

public class MyImages {

    public static Image getLightKeyboardImage() {
        BufferedImage oDefaultLightKeyboardBufferedImage = null;
        try {
            oDefaultLightKeyboardBufferedImage = ImageIO.read(new File("Learning_is_keyboard/graphics/light_mode/light_default.png"));
        } catch (IOException e) {
            e.printStackTrace();
        }

        return oDefaultLightKeyboardBufferedImage.getScaledInstance(1000, 329, Image.SCALE_SMOOTH);
    }

    public static Image getLight_Key_0_Tilde_Image() {
        BufferedImage oDefaultLightKeyboardBufferedImage = null;
        try {
            oDefaultLightKeyboardBufferedImage = ImageIO.read(new File("Learning_is_keyboard/graphics/light_mode/single_keys/key_0_tilde.png"));
        } catch (IOException e) {
            e.printStackTrace();
        }

        return oDefaultLightKeyboardBufferedImage.getScaledInstance(73, 67, Image.SCALE_SMOOTH);
    }

    public static Image getLight_Key_1_One_Image() {
        BufferedImage oDefaultLightKeyboardBufferedImage = null;
        try {
            oDefaultLightKeyboardBufferedImage = ImageIO.read(new File("Learning_is_keyboard/graphics/light_mode/single_keys/key_1_one.png"));
        } catch (IOException e) {
            e.printStackTrace();
        }

        return oDefaultLightKeyboardBufferedImage.getScaledInstance(68, 61, Image.SCALE_SMOOTH);
    }

    public static Image getLight_Key_2_Two_Image() {
        BufferedImage oDefaultLightKeyboardBufferedImage = null;
        try {
            oDefaultLightKeyboardBufferedImage = ImageIO.read(new File("Learning_is_keyboard/graphics/light_mode/single_keys/key_2_two.png"));
        } catch (IOException e) {
            e.printStackTrace();
        }

        return oDefaultLightKeyboardBufferedImage.getScaledInstance(76, 64, Image.SCALE_SMOOTH);
    }

    public static Image getDarkKeyboardImage() {
        BufferedImage oDefaultDarkKeyboardBufferedImage = null;
        try {
            oDefaultDarkKeyboardBufferedImage = ImageIO.read(new File("Learning_is_keyboard/graphics/dark_mode/dark_default.png"));
        } catch (IOException e) {
            e.printStackTrace();
        }

        return oDefaultDarkKeyboardBufferedImage.getScaledInstance(1000, 329, Image.SCALE_SMOOTH);
    }

    public static Image getImage(int i) {
        Image oImageToReturn = getLightKeyboardImage();
        switch (i) {
            case (0): {
                oImageToReturn = getLightKeyboardImage();
            }break;
            case (1): {
                oImageToReturn = getLight_Key_0_Tilde_Image();
            }break;
            case (2): {
                oImageToReturn = getLight_Key_1_One_Image();
            }break;
            case (3): {
                oImageToReturn = getLight_Key_2_Two_Image();
            }break;
        }
        return oImageToReturn;
    }
}
