use crate::{
    Money, Tax, TaxAppliedBy, TaxReduction, TaxReductionAppliedBy, TaxReductions,
    TaxReductionsBuilder, Taxes, TaxesBuilder, helpers::date,
};

static SE_TAX_2024_2025: Tax = Tax::new(
    "Energiskatt",
    Money::from_inner(54875),
    TaxAppliedBy::KwhConsumed,
    date(2024, 1, 1),
    Some(date(2025, 12, 31)),
);
static SE_TAX_2026: Tax = Tax::new(
    "Energiskatt",
    Money::from_inner(45000),
    TaxAppliedBy::KwhConsumed,
    date(2026, 1, 1),
    None,
);

pub(crate) static DEFAULT_SE_TAXES: Taxes = TaxesBuilder::new()
    .add(&SE_TAX_2024_2025)
    .add(&SE_TAX_2026)
    .build();

pub(crate) static REDUCED_SE_TAXES: Taxes = TaxesBuilder::new()
    .add(&SE_TAX_2024_2025.reduce_by(Money::new(0, 12)))
    .add(&SE_TAX_2026.reduce_by(Money::new(0, 12)))
    .build();

pub(crate) static SE_TAX_REDUCTION_2021_2025: TaxReduction = TaxReduction::new(
    "Skatteavdrag mikroproduktion",
    Money::from_inner(60000),
    TaxReductionAppliedBy::KwhFeedIn,
    date(2021, 1, 1),
    Some(date(2025, 12, 31)),
);

pub(crate) static DEFAULT_SE_TAX_REDUCTIONS: TaxReductions = TaxReductionsBuilder::new()
    .add(&SE_TAX_REDUCTION_2021_2025)
    .build();
