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

static FEE_LINK: &str =
    "https://www.c4energi.se/privat/elnat/priser-villkor-avtal/elnatspriser-privat/";
static FEED_IN_LINK: &str = "https://www.c4energi.se/privat/elnat/priser-villkor-avtal/elnatspriser-privat/ersattning-for-overskottsel/";

pub static C_4_ELNAT_AB: GridOperator = GridOperator::builder()
    .name("C4 Elnät AB")
    .vat_number("SE556496004401")
    .country(SE)
    .links(
        Links::builder()
            .fee_info(FEE_LINK, ".content")
            .feed_in_revenue_info_default(FEED_IN_LINK)
            .build(),
    )
    .price_lists(&[PriceList::builder()
        .from_date(2025, 7, 1)
        .monthly_fee(Cost::fuses(&[
            (16, Money::new(6273, 0).divide_by(12)),
            (20, Money::new(8604, 0).divide_by(12)),
            (25, Money::new(10691, 0).divide_by(12)),
            (35, Money::new(15540, 0).divide_by(12)),
            (50, Money::new(22893, 0).divide_by(12)),
            (63, Money::new(30135, 0).divide_by(12)),
            (80, Money::new(42720, 0).divide_by(12)),
            (100, Money::new(59750, 0).divide_by(12)),
            (125, Money::new(84745, 0).divide_by(12)),
            (160, Money::new(114402, 0).divide_by(12)),
            (200, Money::new(149144, 0).divide_by(12)),
        ]))
        .monthly_production_fee(Cost::None)
        .feed_in_revenue(FeedInRevenue::spot_price_variable(3.68, 0.0558, false))
        .transfer_fee(TransferFee::spot_price_variable(5.0, 0.0613, false))
        .power_tariff(PowerTariff::NotImplemented)
        .build()])
    .build();
