/**
 * Gallery Preview Component
 * 
 * Preview of an image gallery as it would appear in chat.
 * Uses the shared Gallery component for parity with live view.
 * 
 * @since 1.5.0
 * @updated 1.6.0 - Migrated to shared component
 * @updated 1.8.0 - Added language prop for multilingual preview
 */

import React from 'react';
import { Gallery } from '@shared/components/widgets/Gallery';
import type { PresetGlobalValues, GalleryWidgetSettings } from '../../../types/appearance';
import { getWidgetStrings } from '@shared/utils/widget-strings';

interface GalleryPreviewProps {
    globalValues: PresetGlobalValues;
    widgetSettings?: GalleryWidgetSettings | null;
    isRTL?: boolean;
    language?: string;
}

export const GalleryPreview: React.FC<GalleryPreviewProps> = ({ 
    globalValues,
    widgetSettings,
    isRTL = true,
    language,
}) => {
    const ws = getWidgetStrings(language);

    return (
        <Gallery
            globalValues={globalValues}
            widgetSettings={widgetSettings as any}
            context="preview"
            isRTL={isRTL}
            language={language}
            previewName={ws.galleryPreviewName}
            previewDescription={ws.galleryPreviewDescription}
        />
    );
};

export default GalleryPreview;
