use crate::registry::prelude::*;

const FEE_LINK: &str =
    "https://www.gislavedenergi.se/el/elnat/elnatsavgifter/elnatsavgifter-sakringsabonnemang/";
const FEED_IN_LINK: &str =
    "https://www.gislavedenergi.se/el/produktion-av-el/salj-din-elproduktion/";

pub static GISLAVED_ENERGI: GridOperator = GridOperator::builder()
    .name("Gislaved Energi")
    .vat_number("SE556223876501")
    .country(SE)
    .links(
        Links::builder()
            .fee_info(FEE_LINK, "#page-content")
            .feed_in_revenue_info_default(FEED_IN_LINK)
            .build(),
    )
    .price_lists(&[PriceList::builder()
        .from_date(2024, 12, 1)
        .monthly_fee(Cost::fuses(&[
            (16, Money::new(291, 58)),
            (20, Money::new(397, 25)),
            (25, Money::new(467, 25)),
            (35, Money::new(658, 33)),
            (50, Money::new(969, 42)),
            (63, Money::new(1246, 58)),
        ]))
        .monthly_production_fee(Cost::None)
        .transfer_fee(TransferFee::fixed_subunit(30.61))
        // Strange model...
        // Nätnytta 4.2 öre (exkl moms) - Rörligt avdrag 3.64 öre (inkl moms) juli 2025 - 3,13 öre/kWh inkl. moms administrativa avgifter
        // Read more: https://www.gislavedenergi.se/el/produktion-av-el/salj-din-elproduktion/
        .feed_in_revenue(FeedInRevenue::fixed_subunit(4.2 - 3.64 - 3.13))
        .power_tariff(PowerTariff::NotImplemented)
        .build()])
    .build();
