import { storage } from "@vendetta/plugin"; import { useProxy } from "@vendetta/storage"; import { React, ReactNative as RN, stylesheet } from "@vendetta/metro/common"; import { semanticColors } from "@vendetta/ui"; import { getAssetIDByName } from "@vendetta/ui/assets"; import { Forms } from "@vendetta/ui/components"; import BetterTableRowGroup from "../components/BetterTableRowGroup"; const { FormSwitchRow, FormRow } = Forms; export default function GaryAPIPage() { useProxy(storage); const [, forceUpdate] = React.useReducer((x) => x + 1, 0); const styles = stylesheet.createThemedStyleSheet({ container: { flex: 1, backgroundColor: semanticColors.BACKGROUND_PRIMARY, }, infoText: { fontSize: 14, color: semanticColors.TEXT_MUTED, marginBottom: 16, textAlign: "center", }, currentText: { fontSize: 14, color: semanticColors.TEXT_MUTED, textAlign: "center", fontWeight: "600", }, }); const currentSource = storage.garySettings.imageSource; return ( } value={storage.enabledCommands.gary} onValueChange={(v) => { storage.enabledCommands.gary = v; storage.pendingRestart = true; forceUpdate(); }} /> Choose which API the /gary command should use to fetch images. } value={currentSource === "gary"} onValueChange={(v) => { if (v) { storage.garySettings.imageSource = "gary"; forceUpdate(); } }} /> } value={currentSource === "catapi"} onValueChange={(v) => { if (v) { storage.garySettings.imageSource = "catapi"; forceUpdate(); } }} /> } value={currentSource === "minker"} onValueChange={(v) => { if (v) { storage.garySettings.imageSource = "minker"; forceUpdate(); } }} /> } value={currentSource === "goober"} onValueChange={(v) => { if (v) { storage.garySettings.imageSource = "goober"; forceUpdate(); } }} /> Currently using:{" "} {currentSource === "gary" ? "Gary API" : currentSource === "catapi" ? "Cat API" : currentSource === "minker" ? "Minker API" : currentSource === "goober" ? "Goober API" : "Gary API"} ); }