import {__} from '@wordpress/i18n'; import {InspectorControls, useBlockProps} from '@wordpress/block-editor'; import {PanelBody, PanelRow, TextareaControl, TextControl} from '@wordpress/components'; import {NeedsSetup} from '../Template/Variations'; declare const window: { GiveDTD: { isApiKeyValid: boolean; settingsPage: string }; } & Window; export default ({attributes, setAttributes}) => { const blockProps = useBlockProps(); return ( <> {window.GiveDTD.isApiKeyValid ? ( setAttributes({label: value})} label={__('Label', 'give-double-the-donation')} /> ) : (
{__('Double the Donation requires setup.', 'give-double-the-donation')}
{__('This block requires your settings to be configured in order to use.', 'give-double-the-donation')}
)}
{window.GiveDTD.isApiKeyValid ? ( {}} /> ) : ( )}
); }