| 1 | import { ExclamationTriangleIcon } from "@heroicons/react/24/outline"; |
| 2 | import ToggleSwitch from "../../components/gui/Switch"; |
| 3 | import { ToolTip } from "../../components/gui/Tooltip"; |
| 4 | interface ContinueFeaturesMenuProps { |
| 5 | logEditingData: boolean; |
| 6 | handleLogEditingDataToggle: (value: boolean) => void; |
| 7 | optInNextEditFeature: boolean; |
| 8 | handleOptInNextEditToggle: (value: boolean) => void; |
| 9 | } |
| 10 | |
| 11 | export function ContinueFeaturesMenu({ |
| 12 | logEditingData, |
| 13 | handleLogEditingDataToggle, |
| 14 | optInNextEditFeature, |
| 15 | handleOptInNextEditToggle, |
| 16 | }: ContinueFeaturesMenuProps) { |
| 17 | return ( |
| 18 | <div className="flex w-full flex-col gap-y-4"> |
| 19 | <div className="my-2 text-center text-xs font-medium text-slate-400"> |
| 20 | 馃毀 INTERNAL SETTINGS 馃毀 |
| 21 | </div> |
| 22 | <div className="flex w-full flex-col gap-y-4"> |
| 23 | <ToggleSwitch |
| 24 | isToggled={logEditingData} |
| 25 | onToggle={() => handleLogEditingDataToggle(!logEditingData)} |
| 26 | text="Log Editing Data" |
| 27 | showIfToggled={ |
| 28 | <> |
| 29 | <ExclamationTriangleIcon |
| 30 | data-tooltip-id={`auto-accept-diffs-warning-tooltip`} |
| 31 | className="h-3 w-3 text-yellow-500" |
| 32 | /> |
| 33 | <ToolTip id={`auto-accept-diffs-warning-tooltip`}> |
| 34 | {`Only turn this on if you want to log your editing processes in addition to the normal dev data. Note that this will store a lot of data.`} |
| 35 | </ToolTip> |
| 36 | </> |
| 37 | } |
| 38 | /> |
| 39 | |
| 40 | <ToggleSwitch |
| 41 | isToggled={optInNextEditFeature} |
| 42 | onToggle={() => handleOptInNextEditToggle(!optInNextEditFeature)} |
| 43 | text="Enable Next Edit Over Autocomplete" |
| 44 | /> |
| 45 | </div> |
| 46 | </div> |
| 47 | ); |
| 48 | } |