import { InnerBlocks, useBlockProps, InspectorControls } from '@wordpress/block-editor'; import { CheckboxControl, PanelBody, PanelRow, SelectControl } from '@wordpress/components'; import { BlockFrame } from '@l-clutch/core/block-editor'; export default function edit({ attributes, setAttributes }) { const blockProps = useBlockProps(); const onChangeReadable = (value) => { setAttributes({ ...attributes, readable: value === 'true' ? true : false }); }; const changeReadableRoles = (role, enable) => { if (enable && !attributes.readableRoles.includes(role)) { setAttributes({ readableRoles: [...attributes.readableRoles, role] }); } else if (!enable && attributes.readableRoles.includes(role)) { setAttributes({ readableRoles: attributes.readableRoles.filter((r) => r !== role) }); } }; const onChangeAddedFriend = (value) => { setAttributes({ ...attributes, readableLineUser: { addedFriend: value } }); }; return (