import { __, sprintf } from '@wordpress/i18n' import { Modal, Button } from '@wordpress/components' import { render } from '@wordpress/element' import ExtendifyLibrary from '../ExtendifyLibrary' import { useWantedTemplateStore } from '../state/Importing' import { getPluginDescription } from '../util/general' export default function NeedsPermissionModal() { const wantedTemplate = useWantedTemplateStore( (store) => store.wantedTemplate, ) const closeModal = () => render( , document.getElementById('extendify-root'), ) const requiredPlugins = wantedTemplate?.fields?.required_plugins || [] return (

{sprintf( __( 'In order to add this %s to your site, the following plugins are required to be installed and activated.', 'extendify', ), wantedTemplate?.fields?.type ?? 'template', )}

{__( 'Please contact a site admin for assistance in adding these plugins to your site.', 'extendify', )}

) }