package cz.moneta.test.regression.commercial.auto.smartauto.mockdata;

import cz.moneta.test.dsl.auto.smartauto.shared.*;
import cz.moneta.test.dsl.auto.smartauto.util.MonthUtil;

public class CarMock {
    public static CalculationData prepareCalculationCar1() {
        return prepareCarTest().
                setCustomer(Customer.CONSUMER)
                .setPrClass(PrClass.CARNEW)
                .setVat(Vat.NO)
                .setMonth(MonthUtil.getCurrentMonth())
                .setProduct(Product.AUTO_CREDIT_C2C);
    }

    public static CalculationData prepareCalculationCar1_1() {
        return prepareCarTest().
                setCustomer(Customer.CONSUMER)
                .setPrClass(PrClass.CARNEW)
                .setVat(Vat.YES)
                .setMonth(MonthUtil.getCurrentMonth())
                .setProduct(Product.AUTO_CREDIT_C2C);
    }

    public static CalculationData prepareCalculationCar2() {
        return prepareCarTest()
                .setCustomer(Customer.CONSUMER)
                .setPrClass(PrClass.CARNEW)
                .setVat(Vat.NO)
                .setMonth(MonthUtil.getCurrentMonth())
                .setProduct(Product.AUTO_CREDIT_C2C);
    }

    public static CalculationData prepareCalculationCar4() {
        return prepareCarTest()
                .setCustomer(Customer.CONSUMER)
                .setPrClass(PrClass.CARUSED)
                .setVat(Vat.NO)
                .setMonth(MonthUtil.getCurrentMonth())
                .setYear(Year.getPreviousYear())
                .setProduct(Product.AUTO_CREDIT_C2C);
    }

    public static CalculationData prepareCalculationCar5() {
        return prepareCarTest()
                .setCustomer(Customer.CONSUMER)
                .setPrClass(PrClass.CARUSED)
                .setVat(Vat.NO)
                .setMonth(MonthUtil.getCurrentMonth())
                .setYear(Year.getPreviousYear())
                .setProduct(Product.AUTO_CREDIT_C2C);
    }

    public static CalculationData prepareCalculationCar7() {
        return prepareCarTest()
                .setCustomer(Customer.BUSINESSMAN_WITHOUT_VAT)
                .setPrClass(PrClass.CARNEW)
                .setVat(Vat.NO)
                .setMonth(MonthUtil.getCurrentMonth())
                .setProduct(Product.AUTO_CREDIT_IC_C2C);
    }

    public static CalculationData prepareCalculationCar8() {
        return prepareCarTest()
                .setCustomer(Customer.BUSINESSMAN_WITHOUT_VAT)
                .setPrClass(PrClass.CARNEW)
                .setVat(Vat.NO)
                .setMonth(MonthUtil.getCurrentMonth())
                .setProduct(Product.AUTO_CREDIT_C2C);
    }

    public static CalculationData prepareCalculationCar9() {
        return prepareCarTest()
                .setCustomer(Customer.BUSINESSMAN_WITHOUT_VAT)
                .setPrClass(PrClass.CARNEW)
                .setVat(Vat.NO)
                .setMonth(MonthUtil.getCurrentMonth())
                .setProduct(Product.AUTO_CREDIT_BACK_LOAN);
    }

    public static CalculationData prepareCalculationCar10() {
        return prepareCarTest()
                .setCustomer(Customer.BUSINESSMAN_WITHOUT_VAT)
                .setPrClass(PrClass.CARUSED)
                .setVat(Vat.NO)
                .setMonth(MonthUtil.getCurrentMonth())
                .setYear(Year.getPreviousYear())
                .setProduct(Product.AUTO_CREDIT_C2C);
    }

    public static CalculationData prepareCalculationCar11() {
        return prepareCarTest()
                .setCustomer(Customer.BUSINESSMAN_WITHOUT_VAT)
                .setPrClass(PrClass.CARUSED)
                .setVat(Vat.NO)
                .setMonth(MonthUtil.getCurrentMonth())
                .setYear(Year.getPreviousYear())
                .setProduct(Product.AUTO_CREDIT_C2C);
    }

    public static CalculationData prepareCalculationCar12() {
        return prepareCarTest()
                .setCustomer(Customer.BUSINESSMAN_WITHOUT_VAT)
                .setPrClass(PrClass.CARUSED)
                .setVat(Vat.NO)
                .setMonth(MonthUtil.getCurrentMonth())
                .setYear(Year.getPreviousYear())
                .setProduct(Product.AUTO_CREDIT_BACK_LOAN);
    }


    private static CalculationData prepareCarTest() {
        CalculationData calculationData = new CalculationData();
        return calculationData
                .setPrGroup(PrGroup.CAR)
                .setGroup(Group.M1)
                .setBrand(Brand.SKODA)
                .setModel(Model.FABIA)
                .setVin("TMBPH16Y013217915")
                .setPrice(2649000)
                .setFuel(FilterFuel.PETROL)
                .setWeight("2120")
                .setPower("112")
                .setVolume("45")
                .setUsage(Usage.OTHERS);
    }
}
