// Adapted from jalcoui (MIT) — github.com/jal-co/ui

'use client';

import { createLazyComponent } from '../../../../common/lazy-wrapper';
import type { DiffViewerProps } from './types';

export const LazyDiffViewer = createLazyComponent<DiffViewerProps>(
  () =>
    import('./DiffViewer').then((mod) => ({ default: mod.DiffViewer })),
  {
    displayName: 'LazyDiffViewer',
    fallback: (
      <div
        data-slot="diff-viewer-skeleton"
        className="h-48 w-full animate-pulse rounded-xl border border-border/60 bg-muted"
      />
    ),
  },
);

export type { DiffViewerProps } from './types';
