/**
 * Cognito Forms WordPress Plugin
 */

import { registerBlockType } from '@wordpress/blocks';
import { __ } from '@wordpress/i18n';

import { BlockAttributes } from './types';

/**
* Internal dependencies
*/
import Edit from './edit';
import Save from './save';

import CogIcon from './assets/cogicon';

registerBlockType<BlockAttributes> ( 'cognito-forms/cognito-embed', {
	title: 'Cognito Forms',
	icon: CogIcon,
	description: __(
		'Easily build powerful forms.',
		'cognito'
	),
	category: 'embed',
	supports: {
		// Removes support for an HTML mode.
		html: false,
	},
	attributes: {
		formId: {
			type: 'string',
		},
		seamlessEmbedCode: {
			type: 'string',
		},
		iframeEmbedCode: {
			type: 'string',
		},
		ampEmbedCode: {
			type: 'string',
		},
		embedMode: {
			type: 'number',
		},
	},
	edit: Edit,
	save: Save,
} );
