// priority: 0

const registerAE2WTLibRecipes = (event) => {

    // Удаление рецептов мода
    event.remove({ id: 'ae2wtlib:pattern_access/wireless_pattern_access_terminal' });
    event.remove({ id: 'ae2wtlib:pattern_encoding/wireless_pattern_encoding_terminal' });
    event.remove({ id: 'ae2wtlib:pattern_encoding/upgrade_wireless_pattern_encoding_terminal' });
    
    event.remove({ id: 'ae2wtlib:magnet_card' });
    event.remove({ id: 'ae2wtlib:quantum_bridge_card' });
    
    // Wireless Pattern Terminal
    event.recipes.gtceu.assembler('ae2wtlib:wireless_pattern_encoding_terminal')
        .itemInputs(
            '2x #gtceu:batteries/ev',
            'ae2:wireless_terminal',
            'ae2:pattern_encoding_terminal',
            '2x gtceu:ev_sensor',
            'gtceu:ev_emitter',
            '2x #forge:rods/ultimet')
        .itemOutputs('ae2wtlib:wireless_pattern_encoding_terminal')
        .duration(300)
        .EUt(GTValues.VA[GTValues.EV])
    
    // Pattern Access Terminal
    event.recipes.gtceu.assembler('ae2wtlib:wireless_pattern_access_terminal')
        .itemInputs(
            '2x #gtceu:batteries/ev',
            'ae2:wireless_terminal',
            'ae2:pattern_access_terminal',
            '2x gtceu:ev_sensor',
            'gtceu:ev_emitter',
            '2x #forge:rods/ultimet')
        .itemOutputs('ae2wtlib:wireless_pattern_access_terminal')
        .duration(300)
        .EUt(GTValues.VA[GTValues.EV])

    // Magnet Card
	event.recipes.gtceu.assembler('ae2wtlib:magnet_card')
        .itemInputs(
            '#forge:ingots/magnetic_neodymium',
            '4x #forge:rods/magnetic_neodymium',
            'ae2:advanced_card',
            'ae2:annihilation_plane')
        .itemOutputs('ae2wtlib:magnet_card')
        .duration(300)
        .EUt(250)

    // Quantum Bridge Card
    event.recipes.gtceu.assembly_line('ae2wtlib:quantum_bridge_card')
        .itemInputs(
            '8x ae2:quantum_ring',
            'ae2:quantum_link',
            'gtceu:quantum_star',
            '2x gtceu:zpm_sensor',
            '4x ae2:wireless_booster',
            '#gtceu:circuits/uv',)
        .inputFluids(
            Fluid.of('gtceu:tritanium', 2304),
            Fluid.of('gtceu:titanium', 2160),
            Fluid.of('gtceu:polybenzimidazole', 1152),
            Fluid.of('gtceu:styrene_butadiene_rubber', 864)
        )    
        .itemOutputs('ae2wtlib:quantum_bridge_card')
        .duration(300)
        .EUt(64000)
        

    event.remove({ output: 'ae2wtlib:wireless_universal_terminal' })

    event.recipes.gtceu.assembler('ae2wtlib:wireless_universal_terminal')
        .itemInputs(
            'ae2:wireless_crafting_terminal',
            'ae2wtlib:wireless_pattern_encoding_terminal',
            'ae2wtlib:wireless_pattern_access_terminal',
            '1x gtceu:iv_sensor',
            '1x gtceu:iv_emitter',
            '2x #forge:plates/rhodium')
        .itemOutputs(Item.of('ae2wtlib:wireless_universal_terminal', '{crafting:1b, pattern_access:1b, pattern_encoding:1b}'))
        .duration(300)
        .EUt(GTValues.VA[GTValues.IV])
}