#!/usr/bin/env bash

# omarchy:summary=Returns true if all of the named Flathub apps are installed system-wide (or false if any of them are missing).
# omarchy:args=<app-ids...>

# Based: Flathub takes the AUR's place for desktop apps, in the system
# installation the image's own flatpaks use.
omarchy-cmd-present flatpak || exit 1

for app in "$@"; do
  flatpak info --system "$app" &>/dev/null || exit 1
done

exit 0
