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

LABEL="local.nodedc.launcher-bff"
PLIST="$HOME/Library/LaunchAgents/${LABEL}.plist"
USER_ID="$(id -u)"

launchctl bootout "gui/${USER_ID}/${LABEL}" >/dev/null 2>&1 || true
launchctl bootout "gui/${USER_ID}" "${PLIST}" >/dev/null 2>&1 || true
rm -f "${PLIST}"

echo "NODE.DC launcher BFF LaunchAgent removed: ${LABEL}"
