import classnames from 'classnames/dedupe';
import {
BlockControls,
InspectorControls,
useBlockProps,
} from '@wordpress/block-editor';
import {
PanelBody,
SelectControl,
TabPanel,
ToolbarDropdownMenu,
ToolbarGroup,
} from '@wordpress/components';
import { applyFilters } from '@wordpress/hooks';
import { __ } from '@wordpress/i18n';
import ApplyFilters from '../../components/apply-filters';
import ColorIndicator from '../../components/color-indicator';
import ColorPicker from '../../components/color-picker';
import IconPicker from '../../components/icon-picker';
import RangeControl from '../../components/range-control';
import getIcon from '../../utils/get-icon';
/**
* Block Edit Class.
*
* @param props
*/
export default function BlockEdit(props) {
const { attributes, setAttributes } = props;
let { className = '' } = props;
const {
type,
size,
icon,
iconSize,
color,
iconColor,
hoverColor,
hoverIconColor,
} = attributes;
className = classnames(
'ghostkit-divider',
`ghostkit-divider-type-${type}`,
className
);
if (icon) {
className = classnames(className, 'ghostkit-divider-with-icon');
}
className = applyFilters('ghostkit.editor.className', className, props);
const blockProps = useBlockProps({ className });
return (
<>