# shellcheck shell=bash
# https://codeberg.org/api/swagger#/notification/notifyGetList
___x_cmd_fjo_notification_ll() {

      param:scope     ___x_cmd_fjo
    param:dsl       '
options:
    --all               "show notifications marked as read"                           <>:Bool="false"
    --since             "Only show items updated after the given time"                <>=""
    --before            "Only show items updated before the given time"               <>=""

    --limit             "Results per page"                                            <>:Numbers="30"
    --page              "Page number of the results to fetch."                        <>:Numbers="1"

    --json|-j           "output origin json data"
    --csv               "output csv data"
    --yml               "output yml data"
'
    param:run

    if ___x_cmd_gx_output_is_format; then
        ___x_cmd_fjo_notification_ls___raw | ___x_cmd_gx_output_format
    else
        ___x_cmd_fjo_notification_ls___raw |\
            ___x_cmd jo 2c .id .repository.full_name .unread .url |\
            ___x_cmd csv header --add ID  Repo  Unread Url | \
            if [ -n "$csv" ]; then  ___x_cmd_cmds cat
            else                    ___x_cmd csv static_tab
            fi
    fi
}