import * as ReactEmail from '@react-email/render'; import config from '@documenso/tailwind-config'; import { Tailwind } from './components'; import { BrandingProvider, type BrandingSettings } from './providers/branding'; export type RenderOptions = ReactEmail.Options & { branding?: BrandingSettings; }; export const render = (element: React.ReactNode, options?: RenderOptions) => { const { branding, ...otherOptions } = options ?? {}; return ReactEmail.render( {element} , otherOptions, ); }; export const renderAsync = async (element: React.ReactNode, options?: RenderOptions) => { const { branding, ...otherOptions } = options ?? {}; return await ReactEmail.renderAsync( {element} , otherOptions, ); };