*
* {t("settings:browser.enable.label")}
*
*
* {t("settings:browser.enable.description")}
*
*
* ```
*/
export function SearchableSetting({
settingId,
section,
label,
children,
className,
...props
}: SearchableSettingProps) {
const searchContext = useSearchIndexContext()
// Register this setting with the search index on mount
// Note: We don't unregister on unmount because settings are indexed once
// during the initial tab cycling phase and remain in the index
useEffect(() => {
if (searchContext) {
searchContext.registerSetting({ settingId, section, label })
}
}, [searchContext, settingId, section, label])
return (