#!/bin/bash

# Install Missing Dependencies Script
# Generated on: 2025-10-13
# Note: This will install the LATEST versions of all dependencies

# Determine if we're in dependency-scripts folder or project root
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
if [[ "$SCRIPT_DIR" == *"/dependency-scripts" ]]; then
    cd "$SCRIPT_DIR/.."
    echo "📁 Working in project root: $(pwd)"
fi

echo "Installing missing dependencies (latest versions)..."

# Production Dependencies
pnpm add -w @casl/ability \
  @casl/vue \
  @fortawesome/fontawesome-svg-core \
  @nestjs/mapped-types \
  @vuelidate/core \
  @vuelidate/validators \
  @vueuse/head \
  @vueuse/integrations \
  axios \
  browser-image-compression \
  chart.js \
  element-plus \
  luxon \
  nestjs-paginate \
  prismjs \
  universal-cookie \
  virtual-scroller \
  vue-axios \
  vue-chartjs \
  vue-demi \
  vuedraggable \
  vue-virtual-scroller

echo "Installing missing dev dependencies..."

# Dev Dependencies
pnpm add -wD @iconify-json/ic \
  @iconify-json/mdi \
  @types/luxon \
  @types/node \
  @types/prismjs \
  critters \
  cross-env \
  sass \
  ts-node \
  unplugin-element-plus \
  vite-plugin-pages \
  vite-plugin-vue-component-preview

echo "All missing dependencies installed!"
echo ""
echo "Note: Your project uses pnpm catalog system. You may want to add these to your catalog configuration."

