export interface HelpText {
  title: string
  body: string
  warning?: string
  recommendation?: string
  unit?: string
  range?: [number, number]
}

export const HELP_TEXTS: Record<string, HelpText> = {
  // Render settings
  'setting.blender_cycles_samples': {
    title: 'Cycles Samples',
    body: 'Number of render samples per pixel. Higher = better quality, longer render time.',
    recommendation: '256 for production, 64 for quick previews',
    unit: 'samples',
    range: [1, 4096],
  },
  'setting.blender_eevee_samples': {
    title: 'EEVEE Samples',
    body: 'Anti-aliasing samples for EEVEE Next renderer. EEVEE is much faster than Cycles but less photorealistic.',
    recommendation: '64 for standard quality',
    unit: 'samples',
    range: [1, 1024],
  },
  'setting.blender_smooth_angle': {
    title: 'Smooth Shading Angle',
    body: 'Angle threshold for auto-smooth shading on imported meshes. Below this angle, faces appear smooth; above it, edges show a sharp crease.',
    recommendation: '30° works well for most bearings',
    unit: 'degrees',
    range: [0, 180],
  },
  'setting.thumbnail_renderer': {
    title: 'Thumbnail Renderer',
    body: 'Which renderer to use for STEP file thumbnails. Blender produces photorealistic results; Three.js is faster but lower quality.',
    recommendation: 'Use Blender for production, Three.js for fast previews',
  },
  'action.regenerate_thumbnails': {
    title: 'Regenerate All Thumbnails',
    body: 'Re-renders thumbnails for all STEP files using current renderer settings. Queues every file on the asset_pipeline worker.',
    warning: 'This queues a large number of tasks. Only run during off-peak hours.',
  },
  'action.process_unprocessed': {
    title: 'Process Unprocessed',
    body: "Queues all STEP files that have status 'pending' or 'failed' for metadata extraction and thumbnail rendering.",
  },
  'action.generate_missing_stls': {
    title: 'Generate Missing STL Caches',
    body: "Creates STL cache files for STEP files that don't have them yet. STL caches speed up repeated renders.",
  },
  'action.seed_aliases': {
    title: 'Seed Material Aliases',
    body: 'Loads the default Schaeffler material alias mappings (Steel→SCHAEFFLER_010101_Steel-Bare, etc). Safe to run multiple times — existing aliases are not overwritten.',
  },
  // Template fields
  'template.lighting_only': {
    title: 'Lighting Only Mode',
    body: 'When enabled, this template provides only the world/HDRI lighting environment. The camera position is computed automatically from the product bounding box, ignoring any camera set up in the .blend file.',
    recommendation: 'Use for HDR light-setup templates where you want auto-framing',
  },
  'template.shadow_catcher': {
    title: 'Shadow Catcher',
    body: "Adds a transparent ground plane that catches shadows from the product. Requires a 'Shadowcatcher' collection in the .blend file. Enables the transparent film option.",
  },
  'template.material_replace_enabled': {
    title: 'Material Replacement',
    body: 'When enabled, Blender will replace part materials with the mapped Schaeffler library materials. When disabled, the original .blend materials are used.',
  },
  // Wizard fields
  'wizard.output_type': {
    title: 'Output Type',
    body: 'Defines what to render: still image, turntable animation, or custom output. Each output type has its own render settings and pricing.',
  },
  'wizard.render_template': {
    title: 'Render Template',
    body: 'A .blend file that provides lighting, camera setup, and optionally a background environment. Templates are matched by product category.',
  },
}
