import { useBlockProps } from '@wordpress/block-editor';
import { encodeBase64 } from '../../utils/base64';
import type { ModelBlockAttributes } from './edit';

export default function save({ attributes }: { attributes: ModelBlockAttributes }) {

  const blockProps = useBlockProps.save({
    className: 'press3d-block1',
    'data-b64': encodeBase64(attributes).data,
    role: 'img',
    'aria-label': attributes.altText || '3D Model',
  });

  return <div {...blockProps} />;
}