package main.java.test;

import java.util.Optional;

import main.java.modul.Catalog;
import main.java.modul.Categorie;
import main.java.modul.Oferta;
import main.java.modul.Produs;
import main.java.service.Log;
import main.java.util.Printer;
import main.java.util.Sort;
import main.java.util.SortUtil1;
import main.java.util.Sorter;
import main.java.util.Streams;
import main.java.util.TVAprice;

/**
 *
 * @author mancim
 */
public class Test {

    public static void main(String[] args) {

        addProduse(Catalog.getInstanec());

        //Sort.orderPrice7(Catalog.getInstanec().getProduse());
        //Sort.orderPrice8(Catalog.getInstanec().getProduse(), SortUtil1::Sort);

        //Sorter s = new Sorter();
        //s.Sort(Catalog.getInstanec().getProduse());

        new Oferta(1231, 20);
        new Oferta(1712, 5);
        new Oferta(2334, 10);
        
        //Streams.L();
        //Streams.M();
        //Streams.N();
        //Streams.O();
        //Streams.P();
        //Streams.Q();
        //Streams.R();
        //Streams.S();
        //Streams.T();
        //Streams.U();
        //Streams.V();
        
        Catalog.getInstanec().getProduse().stream().forEach(Log.logger::trace);

        //System.out.println(TVAprice.addTVARON(100.0, 19.0));
        //System.out.println(TVAprice.addTVAEURO(100.0, 24.0));

        //System.out.println(TVAprice.addTVARON(100.0, 19.0));
        //System.out.println(TVAprice.TVAEURO(100.0, 24.0));
    }

    public static void addProduse(Catalog catalog) {

        catalog.addProdus(new Produs(1712, "Electrocasnic 1", 234.99, Categorie.ELECTROCASNICE));
        catalog.addProdus(new Produs(1231, "Electrocasnic 2", 4234.99, Categorie.ELECTROCASNICE));
        catalog.addProdus(new Produs(1773, "Electrocasnic 3", 99.99, Categorie.ELECTROCASNICE));
        catalog.addProdus(new Produs(1221, "Electrocasnic 4", 56.99, Categorie.ELECTROCASNICE));
        catalog.addProdus(new Produs(1956, "Electrocasnic 5", 233.99, Categorie.ELECTROCASNICE));
        catalog.addProdus(new Produs(1918, "Electrocasnic 6", 564.99, Categorie.ELECTROCASNICE));

        catalog.addProdus(new Produs(2334, "Telefon 1", 2189.99, Categorie.TELEFON));
        catalog.addProdus(new Produs(2231, "Telefon 2", 1449.99, Categorie.TELEFON));
        catalog.addProdus(new Produs(2456, "Telefon 3", 649.99, Categorie.TELEFON));
        catalog.addProdus(new Produs(2528, "Telefon 4", 899.99, Categorie.TELEFON));
        catalog.addProdus(new Produs(2445, "Telefon 5", 467.99, Categorie.TELEFON));
        catalog.addProdus(new Produs(2149, "Telefon 6", 355.99, Categorie.TELEFON));
        catalog.addProdus(new Produs(2859, "Telefon 7", 3578.99, Categorie.TELEFON));
        catalog.addProdus(new Produs(2995, "Telefon 8", 344.99, Categorie.TELEFON));

        catalog.addProdus(new Produs(3412, "Calculator 1", 2189.99, Categorie.CALCULATOR));
        catalog.addProdus(new Produs(3419, "Calculator 2", 2289.99, Categorie.CALCULATOR));
        catalog.addProdus(new Produs(3742, "Calculator 3", 999.99, Categorie.CALCULATOR));
        catalog.addProdus(new Produs(3316, "Calculator 4", 1189.99, Categorie.CALCULATOR));
        catalog.addProdus(new Produs(3123, "Calculator 5", 949.99, Categorie.CALCULATOR));
    }

}
