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

pub static BJARKE_ENERGI: GridOperator = GridOperator::builder()
    .name("Bjärke Energi")
    .vat_number("SE763000012801")
    .country(Country::SE)
    .main_fuses(MainFuseSizes::new_range(16, 63))
    .links(
        Links::builder()
            .fee_info(
                "https://www.bjerke-energi.se/elnat/tariffer/normaltariff/",
                "h2 ~ table",
            )
            .build(),
    )
    .price_lists(&[PriceList::builder()
        .from_date(2025, 1, 1)
        .monthly_fee(Cost::fuses(&[
            (16, Money::new(375, 0)),
            (20, Money::new(437, 50)),
            (25, Money::new(500, 0)),
            (35, Money::new(635, 42)),
            (50, Money::new(833, 33)),
            (63, Money::new(1000, 0)),
        ]))
        .monthly_production_fee(Cost::Unverified)
        .feed_in_revenue(FeedInRevenue::Unverified)
        .transfer_fee(TransferFee::new_periods(CostPeriods::new_first(&[
            CostPeriod::builder()
                .load(High)
                .fixed_cost_subunit(18.75)
                .months(November, March)
                .hours(6, 22)
                .exclude_weekends()
                .exclude_holidays(Country::SE)
                .build(),
            CostPeriod::builder()
                .load(Low)
                .fixed_cost_subunit(16.25)
                .build(),
        ])))
        .power_tariff(PowerTariff::new(
            TariffCalculationMethod::AverageHours(1),
            CostPeriods::new_first(&[
                CostPeriod::builder()
                    .load(High)
                    .fixed_cost(50, 0)
                    .months(April, October)
                    .hours(6, 22)
                    .build(),
                CostPeriod::builder()
                    .load(High)
                    .fixed_cost(125, 0)
                    .months(November, March)
                    .hours(6, 22)
                    .build(),
                CostPeriod::builder().load(Low).fixed_cost(0, 0).build(),
            ]),
        ))
        .build()])
    .build();
