import * as React from 'react'; import { __ } from '@wordpress/i18n'; import { BlockEditProps } from '@wordpress/blocks'; import { Placeholder, ExternalLink } from '@wordpress/components'; import CogIcon from '@/assets/cogicon'; import SelectDialog from '@/components/select-dialog'; import { BlockAttributes, EmbedMode } from '@/types'; const Edit: React.FC> = ( { attributes, setAttributes, className } ) => { const handleForm = ( form: string ) => { const formObj = JSON.parse( form ); setAttributes( { formId: formObj.formId, seamlessEmbedCode: formObj.embedCodes.Seamless, iframeEmbedCode: formObj.embedCodes.IFrame, ampEmbedCode: formObj.embedCodes.Amp, embedMode: EmbedMode.Seamless, } ); }; if ( ! attributes.formId ) { return (
{ __( 'Learn more about embeds' ) }
); } return (
); } export default Edit;