import { defineBlockSchema } from '@blockeditor/store';
export function createEmbedBlock({ schema, service, view, }) {
    const blockSchema = defineBlockSchema({
        flavour: `affine:embed-${schema.name}`,
        props: internalPrimitives => {
            const userProps = schema.props?.(internalPrimitives);
            return {
                index: 'a0',
                xywh: '[0,0,0,0]',
                rotate: 0,
                ...(userProps || {}),
            };
        },
        metadata: {
            version: schema.version,
            role: 'content',
        },
        toModel: schema.toModel,
        transformer: schema.transformer,
    });
    return {
        schema: blockSchema,
        service,
        view,
    };
}
//# sourceMappingURL=helper.js.map