import { FC, memo } from 'react' export type BasePluginSettings = { enabled?: boolean } export const wrapPlugin = (Component: FC, defaultEnabled?: boolean) => { const wrappedComponent = memo(({ enabled, ...props }) => { if (!(enabled ?? defaultEnabled)) return <> return }) return wrappedComponent }