package one.oth3r.sit.screen;

import com.terraformersmc.modmenu.api.ModMenuApi;

public class ModMenu implements ModMenuApi {
//    private static MutableText lang(String key, Object... args) {
//        return Utl.lang("config."+key,args);
//    }
//    @Override
//    public ConfigScreenFactory<?> getModConfigScreenFactory() {
//        return parent -> YetAnotherConfigLib.createBuilder().save(config::save)
//                .title(Text.of("Sit!"))
//                .category(ConfigCategory.createBuilder()
//                        .name(lang("category.general"))
//                        .option(Option.<Boolean>createBuilder()
//                                .name(lang("general.keep_active"))
//                                .description(OptionDescription.of(lang("general.keep_active.description")))
//                                .binding(config.defaults.keepActive, () -> config.keepActive, n -> config.keepActive = n)
//                                .controller(opt -> BooleanControllerBuilder.create(opt).trueFalseFormatter())
//                                .build())
//                        .option(Option.<Boolean>createBuilder()
//                                .name(lang("general.sit_while_seated"))
//                                .description(OptionDescription.of(lang("general.sit_while_seated.description")))
//                                .binding(config.defaults.sitWhileSeated, () -> config.sitWhileSeated, n -> config.sitWhileSeated = n)
//                                .controller(opt -> BooleanControllerBuilder.create(opt).trueFalseFormatter())
//                                .build())
//                        .group(OptionGroup.createBuilder()
//                                .name(lang("general.sittable"))
//                                .description(OptionDescription.of(lang("general.sittable.description")))
//                                .option(Option.<Boolean>createBuilder()
//                                        .name(lang("general.sittable.stairs"))
//                                        .binding(config.defaults.stairsOn, () -> config.stairsOn, n -> config.stairsOn = n)
//                                        .controller(opt -> BooleanControllerBuilder.create(opt).onOffFormatter())
//                                        .build())
//                                .option(Option.<Boolean>createBuilder()
//                                        .name(lang("general.sittable.slabs"))
//                                        .binding(config.defaults.slabsOn, () -> config.slabsOn, n -> config.slabsOn = n)
//                                        .controller(opt -> BooleanControllerBuilder.create(opt).onOffFormatter())
//                                        .build())
//                                .option(Option.<Boolean>createBuilder()
//                                        .name(lang("general.sittable.carpets"))
//                                        .binding(config.defaults.carpetsOn, () -> config.carpetsOn, n -> config.carpetsOn = n)
//                                        .controller(opt -> BooleanControllerBuilder.create(opt).onOffFormatter())
//                                        .build())
//                                .option(Option.<Boolean>createBuilder()
//                                        .name(lang("general.sittable.full_blocks"))
//                                        .binding(config.defaults.fullBlocksOn, () -> config.fullBlocksOn, n -> config.fullBlocksOn = n)
//                                        .controller(opt -> BooleanControllerBuilder.create(opt).onOffFormatter())
//                                        .build())
//                                .option(Option.<Boolean>createBuilder()
//                                        .name(lang("general.sittable.custom"))
//                                        .description(OptionDescription.of(lang("general.sittable.custom.description")))
//                                        .binding(config.defaults.customOn, () -> config.customOn, n -> config.customOn = n)
//                                        .controller(opt -> BooleanControllerBuilder.create(opt).onOffFormatter())
//                                        .build())
//                                .build())
//                        .group(ListOption.<String>createBuilder()
//                                .name(lang("general.sittable_blocks"))
//                                .description(OptionDescription.of(
//                                        lang("general.sittable_blocks.description")
//                                                .append("\n\n").append(lang("example",
//                                                        Text.literal("\"")
//                                                                .append(Text.literal("minecraft:campfire").styled(style -> style.withColor(TextColor.fromFormatting(Formatting.AQUA))))
//                                                                .append("|")
//                                                                .append(Text.literal("0.255").styled(style -> style.withColor(TextColor.fromFormatting(Formatting.RED))))
//                                                                .append("|")
//                                                                .append(Text.literal("1").styled(style -> style.withColor(TextColor.fromFormatting(Formatting.GREEN))))
//                                                                .append("|")
//                                                                .append(Text.literal("lit=false").styled(style -> style.withColor(TextColor.fromFormatting(Formatting.GOLD))))
//                                                                .append("\"").styled(style -> style.withColor(TextColor.fromFormatting(Formatting.GRAY)))))
//                                                .append("\n\n").append(lang("general.sittable_blocks.description.2").styled(style -> style.withColor(TextColor.fromFormatting(Formatting.AQUA))))
//                                                .append("\n").append(lang("general.sittable_blocks.description.3").styled(style -> style.withColor(TextColor.fromFormatting(Formatting.RED))))
//                                                .append("\n").append(lang("general.sittable_blocks.description.4").styled(style -> style.withColor(TextColor.fromFormatting(Formatting.GREEN))))
//                                                .append("\n").append(lang("general.sittable_blocks.description.5").styled(style -> style.withColor(TextColor.fromFormatting(Formatting.GOLD))))
//                                                .append("\n\n").append(lang("general.sittable_blocks.description.6").styled(style -> style.withColor(TextColor.fromFormatting(Formatting.YELLOW))))))
//                                .binding(config.defaults.customBlocks, () -> config.customBlocks, n -> config.customBlocks = n)
//                                .controller(StringControllerBuilder::create)
//                                .initial("")
//                                .build())
//                        .build())
//                .category(ConfigCategory.createBuilder()
//                        .name(lang("category.main_hand"))
//                        .option(Option.<config.HandRequirement>createBuilder()
//                                .name(lang("hand.requirement"))
//                                .description(OptionDescription.of(lang("hand.requirement.description")
//                                        .append("\n\n").append(lang("hand.requirement.description.2",lang("hand.requirement.empty")).styled(style -> style.withColor(TextColor.fromFormatting(Formatting.AQUA))))
//                                        .append("\n").append(lang("hand.requirement.description.3",lang("hand.requirement.restrictive")).styled(style -> style.withColor(TextColor.fromFormatting(Formatting.GREEN))))
//                                        .append("\n").append(lang("hand.requirement.description.4",lang("hand.requirement.none")).styled(style -> style.withColor(TextColor.fromFormatting(Formatting.RED))))))
//                                .binding(config.defaults.mainReq, () -> config.mainReq, n -> config.mainReq = n)
//                                .controller(opt -> EnumControllerBuilder.create(opt).enumClass(config.HandRequirement.class)
//                                        .formatValue(v -> lang("hand.requirement."+v.toString())))
//                                .build())
//                        .group(OptionGroup.createBuilder()
//                                .name(lang("hand.restriction"))
//                                .description(OptionDescription.of(lang("hand.restriction.description")))
//                                .option(Option.<Boolean>createBuilder()
//                                        .name(lang("hand.restriction.blocks"))
//                                        .binding(config.defaults.mainBlock,()-> config.mainBlock,n -> config.mainBlock = n)
//                                        .controller(opt -> BooleanControllerBuilder.create(opt).trueFalseFormatter())
//                                        .build())
//                                .option(Option.<Boolean>createBuilder()
//                                        .name(lang("hand.restriction.food"))
//                                        .binding(config.defaults.mainFood,()-> config.mainFood,n -> config.mainFood = n)
//                                        .controller(opt -> BooleanControllerBuilder.create(opt).trueFalseFormatter())
//                                        .build())
//                                .option(Option.<Boolean>createBuilder()
//                                        .name(lang("hand.restriction.usable"))
//                                        .description(OptionDescription.of(lang("hand.restriction.usable.description")))
//                                        .binding(config.defaults.mainUsable,()-> config.mainUsable,n -> config.mainUsable = n)
//                                        .controller(opt -> BooleanControllerBuilder.create(opt).trueFalseFormatter())
//                                        .build())
//                                .build())
//                        .group(ListOption.<String>createBuilder()
//                                .name(lang("hand.restriction.whitelist"))
//                                .description(OptionDescription.of(lang("hand.restriction.list.description")
//                                        .append("\n\n").append(lang("example",
//                                                        Text.empty().append(Utl.Assets.LIST).styled(style -> style.withItalic(true).withColor(TextColor.fromFormatting(Formatting.GRAY)))))))
//                                .binding(config.defaults.mainWhitelist, () -> config.mainWhitelist, n -> config.mainWhitelist = n)
//                                .controller(StringControllerBuilder::create)
//                                .initial("")
//                                .build())
//                        .group(ListOption.<String>createBuilder()
//                                .name(lang("hand.restriction.blacklist"))
//                                .description(OptionDescription.of(lang("hand.restriction.list.description")
//                                        .append("\n\n").append(lang("example",
//                                                        Text.empty().append(Utl.Assets.LIST).styled(style -> style.withItalic(true).withColor(TextColor.fromFormatting(Formatting.GRAY)))))))
//                                .binding(config.defaults.mainBlacklist, () -> config.mainBlacklist, n -> config.mainBlacklist = n)
//                                .controller(StringControllerBuilder::create)
//                                .initial("")
//                                .build())
//                        .build())
//                .category(ConfigCategory.createBuilder()
//                        .name(lang("category.off_hand"))
//                        .option(Option.<config.HandRequirement>createBuilder()
//                                .name(lang("hand.requirement"))
//                                .description(OptionDescription.of(lang("hand.requirement.description")
//                                        .append("\n\n").append(lang("hand.requirement.description.2",lang("hand.requirement.empty")).styled(style -> style.withColor(TextColor.fromFormatting(Formatting.AQUA))))
//                                        .append("\n").append(lang("hand.requirement.description.3",lang("hand.requirement.restrictive")).styled(style -> style.withColor(TextColor.fromFormatting(Formatting.GREEN))))
//                                        .append("\n").append(lang("hand.requirement.description.4",lang("hand.requirement.none")).styled(style -> style.withColor(TextColor.fromFormatting(Formatting.RED))))))
//                                .binding(config.defaults.offReq, () -> config.offReq, n -> config.offReq = n)
//                                .controller(opt -> EnumControllerBuilder.create(opt).enumClass(config.HandRequirement.class)
//                                        .formatValue(v -> lang("hand.requirement."+v.toString())))
//                                .build())
//                        .group(OptionGroup.createBuilder()
//                                .name(lang("hand.restriction"))
//                                .description(OptionDescription.of(lang("hand.restriction.description")))
//                                .option(Option.<Boolean>createBuilder()
//                                        .name(lang("hand.restriction.blocks"))
//                                        .binding(config.defaults.offBlock,()-> config.offBlock,n -> config.offBlock = n)
//                                        .controller(opt -> BooleanControllerBuilder.create(opt).trueFalseFormatter())
//                                        .build())
//                                .option(Option.<Boolean>createBuilder()
//                                        .name(lang("hand.restriction.food"))
//                                        .binding(config.defaults.offFood,()-> config.offFood,n -> config.offFood = n)
//                                        .controller(opt -> BooleanControllerBuilder.create(opt).trueFalseFormatter())
//                                        .build())
//                                .option(Option.<Boolean>createBuilder()
//                                        .name(lang("hand.restriction.usable"))
//                                        .description(OptionDescription.of(lang("hand.restriction.usable.description")))
//                                        .binding(config.defaults.offUsable,()-> config.offUsable,n -> config.offUsable = n)
//                                        .controller(opt -> BooleanControllerBuilder.create(opt).trueFalseFormatter())
//                                        .build())
//                                .build())
//                        .group(ListOption.<String>createBuilder()
//                                .name(lang("hand.restriction.whitelist"))
//                                .description(OptionDescription.of(lang("hand.restriction.list.description")
//                                        .append("\n\n").append(lang("example",
//                                                        Text.empty().append(Utl.Assets.LIST).styled(style -> style.withItalic(true).withColor(TextColor.fromFormatting(Formatting.GRAY)))))))
//                                .binding(config.defaults.offWhitelist, () -> config.offWhitelist, n -> config.offWhitelist = n)
//                                .controller(StringControllerBuilder::create)
//                                .initial("")
//                                .build())
//                        .group(ListOption.<String>createBuilder()
//                                .name(lang("hand.restriction.blacklist"))
//                                .description(OptionDescription.of(lang("hand.restriction.list.description")
//                                        .append("\n\n").append(lang("example",
//                                                        Text.empty().append(Utl.Assets.LIST).styled(style -> style.withItalic(true).withColor(TextColor.fromFormatting(Formatting.GRAY)))))))
//                                .binding(config.defaults.offBlacklist, () -> config.offBlacklist, n -> config.offBlacklist = n)
//                                .controller(StringControllerBuilder::create)
//                                .initial("")
//                                .build())
//                        .build())
//                .build().generateScreen(parent);
//    }
}
