/** * Showcase - Left panel for displaying example images * Features: * - Main image display with navigation * - Thumbnail rail for quick switching * - Params panel for image metadata * - Keyboard navigation support (← →) */ import { escapeHtml } from '../shared/utils.js'; import { translate } from '../../utils/i18nHelpers.js'; export class Showcase { constructor(container) { this.element = container; this.images = []; this.currentIndex = 0; this.modelHash = ''; this.filePath = ''; this.paramsVisible = false; } /** * Render the showcase */ render({ images, modelHash, filePath }) { this.images = images || []; this.modelHash = modelHash || ''; this.filePath = filePath || ''; this.currentIndex = 0; this.paramsVisible = false; this.element.innerHTML = this.getTemplate(); this.bindEvents(); if (this.images.length > 0) { this.loadImage(0); } } /** * Get the HTML template */ getTemplate() { const hasImages = this.images.length > 0; return `
${translate('modals.model.examples.empty', {}, 'No example images available')}