import { __ } from '@wordpress/i18n';
import { InspectorControls, BlockControls } from "@wordpress/block-editor";
import ServerSideRender from "@wordpress/server-side-render";
import {
SelectControl,
ToolbarGroup,
ToolbarButton,
ToggleControl,
Panel,
PanelBody,
PanelRow,
} from "@wordpress/components";
import { useBlockProps } from "@wordpress/block-editor";
export default function Edit({ attributes, setAttributes }) {
const blockProps = useBlockProps();
return (
setAttributes({ max_level: Number(level) })
}
/>
setAttributes({ no_title: !attributes.no_title })
}
/>
tag with an tag. This adds decimal numbers to each heading in the TOC.",
"simpletoc"
)}
checked={attributes.use_ol}
onChange={() => setAttributes({ use_ol: !attributes.use_ol })}
/>
setAttributes({ remove_indent: !attributes.remove_indent })}
/>
setAttributes({
use_absolute_urls: !attributes.use_absolute_urls,
})
}
/>
setAttributes({
add_smooth: !attributes.add_smooth,
})
}
/>
setAttributes({ updated: Date.now() })}
icon="update"
/>
);
}