@echo off
REM Start File Watcher & FTP Deployer
REM Usage: Double-click this file or run: start-watcher.bat

setlocal enabledelayedexpansion

echo.
echo ╔══════════════════════════════════════════════════════════════╗
echo ║          SMS App - Starting File Watcher                     ║
echo ╚══════════════════════════════════════════════════════════════╝
echo.

REM Check for Node.js first
where node >nul 2>nul
if !errorlevel! equ 0 (
    echo [✓] Node.js found - using Node.js watcher
    echo.
    node watch-deploy.js
    goto :end
)

REM Fall back to PowerShell
echo [ℹ] Node.js not found, using PowerShell watcher
echo.
powershell -NoProfile -ExecutionPolicy Bypass -File watch-deploy.ps1

:end
pause
