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

const FEE_LINK: &str = "https://www.smedjebackenenergi.se/elnat/elnatspriser.html";
const FEED_IN_LINK: &str = "https://www.smedjebackenenergi.se/elnat/producera-egen-el.html";

pub static SMEDJEBACKEN_ENERGI_NAT_AB: GridOperator = GridOperator::builder()
    .name("Smedjebacken Energi Nät AB")
    .vat_number("SE556527871901")
    .country(SE)
    .links(
        Links::builder()
            .fee_info(FEE_LINK, ".pagecontent")
            .feed_in_revenue_info_default(FEED_IN_LINK)
            .build(),
    )
    .price_lists(&[
        PriceList::builder()
            .from_date(2025, 1, 1)
            .monthly_fee(Cost::fuses(&[
                (16, Money::new(4526, 25).divide_by(12)),
                (20, Money::new(4526, 25).divide_by(12)),
                (25, Money::new(6077, 50).divide_by(12)),
                (35, Money::new(7208, 75).divide_by(12)),
                (50, Money::new(91105, 0).divide_by(12)),
                (63, Money::new(10352, 5).divide_by(12)),
                (80, Money::new(11568, 75).divide_by(12)),
                (100, Money::new(18076, 25).divide_by(12)),
                (125, Money::new(23861, 25).divide_by(12)),
                (160, Money::new(28200, 0).divide_by(12)),
                (200, Money::new(38210, 0).divide_by(12)),
            ]))
            .monthly_production_fee(Cost::None)
            .feed_in_revenue(FeedInRevenue::fixed_subunit(3.5))
            .transfer_fee(TransferFee::fixed_subunit(26.25))
            .power_tariff(PowerTariff::NotImplemented)
            .build(),
        PriceList::builder()
            .from_date(2026, 1, 1)
            .monthly_fee(Cost::fuses(&[
                (16, Money::new(5033, 25).divide_by(12)),
                (20, Money::new(5033, 25).divide_by(12)),
                (25, Money::new(6758, 50).divide_by(12)),
                (35, Money::new(8015, 75).divide_by(12)),
                (50, Money::new(92122, 0).divide_by(12)),
                (63, Money::new(11511, 5).divide_by(12)),
                (80, Money::new(12216, 75).divide_by(12)),
                (100, Money::new(19088, 25).divide_by(12)),
                (125, Money::new(25197, 25).divide_by(12)),
                (160, Money::new(29779, 0).divide_by(12)),
                (200, Money::new(40356, 0).divide_by(12)),
            ]))
            .monthly_production_fee(Cost::None)
            .feed_in_revenue(FeedInRevenue::fixed_subunit(3.5))
            .transfer_fee(TransferFee::fixed_subunit(26.25 + 4.5 * 1.25))
            .power_tariff(PowerTariff::NotImplemented)
            .build(),
    ])
    .build();
