import { ProductCategory } from './constants';

import { ReturnProcessQuestion } from '../models';
import { bookCalendarQuestions } from './book-calendar';
import { tonDatentraegerQuestions } from './ton-datentraeger';
import { nonbookQuestions } from './nonbook';
import { elektronischeGeraeteQuestions } from './elektronische-geraete';
import { tolinoQuestions } from './tolino';

/**
 * A mapping of product categories to their respective return process questions.
 * This registry centrally connects each product category with its specific
 * question flow, allowing the application to dynamically load the appropriate
 * questions based on the product being returned.
 *
 * Each category maps to an array of ReturnProcessQuestion objects that define
 * the questions, their sequence, and the branching logic for that category.
 */
export const CategoryQuestions: Record<
  ProductCategory,
  ReturnProcessQuestion[]
> = {
  [ProductCategory.BookCalendar]: bookCalendarQuestions,
  [ProductCategory.TonDatentraeger]: tonDatentraegerQuestions,
  [ProductCategory.SpielwarenPuzzle]: nonbookQuestions,
  [ProductCategory.SonstigesNonbook]: nonbookQuestions,
  [ProductCategory.ElektronischeGeraete]: elektronischeGeraeteQuestions,
  [ProductCategory.Tolino]: tolinoQuestions,
  [ProductCategory.Unknown]: [],
};
