#!/usr/bin/env bash
set -euo pipefail

OUT_DIR="${OUT_DIR:-./question-bank-templates}"
mkdir -p "$OUT_DIR"

generate() {
  local file="$1"
  local prefix="$2"
  local count="$3"
  echo "code,prompt" > "$OUT_DIR/$file"
  for i in $(seq 1 "$count"); do
    printf "%s%03d,请在此填写正式授权题干\n" "$prefix" "$i" >> "$OUT_DIR/$file"
  done
}

generate "EPQ-2058.csv" "2058" 90
generate "SCL90-2078.csv" "2078" 90
generate "PF16-2081.csv" "2081" 187
generate "SDS-2082.csv" "2082" 20
generate "SAS-2083.csv" "2083" 20
generate "SQA-2084.csv" "2084" 29

echo "Question templates written to $OUT_DIR"
