import {ActionPanel, ImageLike} from "@raycast/api"; interface TogglePreferenceActionProps { name: string; pref: string; options: string[]; current: string; updatePref: (pref: string, currentValue: string | boolean) => Promise; icon: ImageLike; } export default function PreferenceListActions({ name, pref, options, current, updatePref, icon, }: TogglePreferenceActionProps) { return ( <> {options .filter((option) => option !== current) .map((option) => ( updatePref(pref, option)} /> ))} ); }