import { React, stylesheet } from "@vendetta/metro/common"; import { storage } from "@vendetta/plugin"; import { useProxy } from "@vendetta/storage"; import { semanticColors } from "@vendetta/ui"; import { Forms } from "@vendetta/ui/components"; import { ScrollView } from "react-native"; const { FormSection, FormInput, FormRow, FormSwitch, FormText } = Forms; const styles = stylesheet.createThemedStyleSheet({ subText: { fontSize: 14, marginLeft: 16, marginRight: 16, color: semanticColors.TEXT_MUTED }, textLink: { color: semanticColors.TEXT_LINK, } }); export default function ConfigEditor({ selection }: { selection: string }) { const settings = useProxy(storage.selections[selection]) as Activity; return ( settings.name = v} /> settings.application_id = v} keyboardType="numeric" /> settings.type = v} keyboardType="numeric" /> settings.details = v} /> settings.state = v} /> settings.assets.large_image = v} /> settings.assets.large_text = v} /> settings.assets.small_image = v} /> settings.assets.small_text = v} /> {"Image assets key can be either a Discord app asset's name or a URL to an image."} settings.timestamps._enabled = v} />} /> settings.timestamps.start = v} keyboardType="numeric" /> settings.timestamps.end = v} keyboardType="numeric" /> settings.timestamps.start = String(Date.now())} trailing={FormRow.Arrow} /> Leaving start timestamp blank will use the time the Discord started. settings.buttons[0].label = v} /> settings.buttons[0].url = v} /> settings.buttons[1].label = v} /> settings.buttons[1].url = v} /> ); }