'use client';

/** Lottie block — thin chat wrapper around `LottiePlayer`. */

import { LazyLottiePlayer } from '../../../../media/LottiePlayer/lazy';
import type { LottieBlock } from '../../../types/block';
import type { BlockRendererProps } from './types';

export default function LottieBlockRenderer({ block, ctx }: BlockRendererProps<LottieBlock>) {
  return <LazyLottiePlayer src={block.src} size={ctx.appearance === 'compact' ? 'sm' : 'md'} />;
}
