import { useTranslation } from "react-i18next";
import { Plugin } from "../../application/Plugin.mjs";
import { ScrollAssistantProvider } from "./ScrollAssistant.provider.mjs";
import { useScrollAssistantStatus } from "./ScrollAssistantStatus.provider.mjs";
const scrollAssistant = {
    name: 'scrollAssistant',
    useLoadMethod: ()=>{
        const { setEnable } = useScrollAssistantStatus();
        const { t } = useTranslation();
        return {
            title: t('Scroll assistant'),
            actionProps: {
                onClick: ()=>{
                    setEnable((enable)=>!enable);
                }
            }
        };
    }
};
class ScrollAssistantPlugin extends Plugin {
    async load() {
        this.app.use(ScrollAssistantProvider);
        this.app.pluginContextMenu.add(scrollAssistant.name, scrollAssistant);
    }
}
export { ScrollAssistantPlugin, scrollAssistant };
