const simpleModal = (contentHtml, rejectText, resolveText) => ({ contentHtml: typeof contentHtml === 'function' ? contentHtml : () => contentHtml, rejectText, resolveText, }); /* eslint sort-keys: "error" */ export default { commentDeletion: simpleModal( '
You are about to delete a comment. Are you sure?
', 'No', 'Yes, delete', ), discussionDeletion: simpleModal( 'You are about to delete a discussion. Are you sure?
', 'No', 'Yes, delete', ), fileRestoration: simpleModal( 'You are about to revert some changes. Are you sure?
', 'No', 'Yes, revert', ), folderDeletion: simpleModal( config => `You are about to delete the folder ${config.item.name}. Its files will be moved to Trash. Are you sure?
`, 'No', 'Yes, delete', ), pathConflict: simpleModal( config => `${config.item.name} already exists. Do you want to add a suffix?
`, 'No', 'Yes, add suffix', ), paymentSuccess: simpleModal( 'Your sponsorship will be active in a minute.
', 'Ok', ), providerRedirection: simpleModal( config => `You are about to navigate to the ${config.name} authorization page.
`, 'Cancel', 'Ok, go on', ), removeWorkspace: simpleModal( 'You are about to remove a workspace locally. Are you sure?
', 'No', 'Yes, remove', ), reset: simpleModal( 'This will clean all your workspaces locally. Are you sure?
', 'No', 'Yes, clean', ), signInForComment: simpleModal( `You have to sign in with Google to start commenting.
You have to sign in with Google to sponsor.
This feature is restricted to sponsors as it relies on server resources.
', 'Ok, I understand', ), stripName: simpleModal( config => `${config.item.name} contains illegal characters. Do you want to strip them?
`, 'No', 'Yes, strip', ), tempFileDeletion: simpleModal( config => `You are about to permanently delete the temporary file ${config.item.name}. Are you sure?
`, 'No', 'Yes, delete', ), tempFolderDeletion: simpleModal( 'You are about to permanently delete all the temporary files. Are you sure?
', 'No', 'Yes, delete all', ), trashDeletion: simpleModal( 'Files in the trash are automatically deleted after 7 days of inactivity.
', 'Ok', ), unauthorizedName: simpleModal( config => `${config.item.name} is an unauthorized name.
`, 'Ok', ), workspaceGoogleRedirection: simpleModal( 'StackEdit needs full Google Drive access to open this workspace.
', 'Cancel', 'Ok, grant', ), };