import { registerBlockType } from '@wordpress/blocks';
import { __ } from '@wordpress/i18n';
import { useBlockProps } from '@wordpress/block-editor';

import './editor.scss';
import './style.scss';

registerBlockType('simple-ajax-product-search-for-woocommerce/simple-ajax-product-search-toggle', {
    title: __('Simple AJAX Product Search for WooCommerce Toggle', 'simple-ajax-product-search-for-woocommerce'),
    icon: 'search',
    category: 'widgets',
    edit() {
        return <div {...useBlockProps()}>Search Toggle (Editor View)</div>;
    },
    save() {
        return null; // Server-rendered
    },
});