import { createElement } from '@wordpress/element'
import { __ } from 'ct-i18n'
import { registerBlockType } from '@wordpress/blocks'
import { addFilter } from '@wordpress/hooks'
import Edit from './Edit'
import { getAttributesFromOptions, getOptionsForBlock } from 'blocksy-options'
import { colorsDefaults } from './colors'
export const options = getOptionsForBlock('newsletter')
export const defaultAttributes = getAttributesFromOptions(options)
registerBlockType('blocksy/newsletter', {
apiVersion: 3,
title: __('Newsletter Controls', 'blocksy-companion'),
icon: {
src: (
),
},
category: 'widgets',
supports: {
html: false,
inserter: false,
lock: false,
__experimentalBorder: {
color: false,
radius: true,
width: false,
__experimentalSkipSerialization: true,
__experimentalDefaultControls: {
color: false,
radius: true,
width: false,
},
},
},
parent: ['blocksy/widgets-wrapper'],
attributes: { ...defaultAttributes, ...colorsDefaults },
edit: (props) =>