/**
 * Preset Preview Map
 *
 * Maps preset IDs to their preview image paths.
 * Images should be placed in /assets/img/presets/ folder.
 */

// Base path for preset images (relative to plugin root)
const PRESET_IMAGES_PATH = window.oppbAdmin.pluginUrl + "assets/img/presets";

/**
 * Get the preview image URL for a preset
 * Images should be named as: {preset-id}.png (e.g., simple-basic.png)
 */
export function getPresetPreviewUrl(presetId: string): string {
  return `${PRESET_IMAGES_PATH}/${presetId}.png`;
}

/**
 * Preset image filenames for reference:
 *
 * Simple Price:
 * - simple-basic.png
 * - simple-currency-centered.png
 * - simple-elegant.png
 * - simple-bold.png
 *
 * Sale Price:
 * - sale-classic.png
 * - sale-black-badge.png
 * - sale-red-badge.png
 * - sale-stacked.png
 *
 * Variable Simple:
 * - variable-simple-range.png
 * - variable-simple-compact.png
 *
 * Variable Sale:
 * - variable-sale-range.png
 * - variable-sale-badge.png
 */

/**
 * Get the full preview gif URL for a preset
 * Only returns gif URL if fullPreview is defined
 */
export function getPresetFullPreviewUrl(fullPreviewId: string | undefined): string | null {
  if (!fullPreviewId) {
    return null;
  }
  return `${PRESET_IMAGES_PATH}/${fullPreviewId}.gif`;
}
