fn: sgnd_is_ui_mode
Purpose
Check whether interactive UI mode is permitted and available.
Description
FLAG_NOUI and FLAG_BATCH take priority over FLAG_UI; otherwise checks both stdin and stdout TTYs.
Returns
- 0 for enabled UI or interactive stdin/stdout; 1 when disabled or batch.
Usage
sgnd_is_ui_mode
