{
  "$schema": "./.schemas/page.schema.json",
  "title": "Reminders list",
  "title_from": {
    "ref": "reminders",
    "value": "list_title"
  },
  "icon": "checklist",
  "sidebar": false,
  "params": {
    "list": {
      "example": "8F3C2A1D-4B6E-4C7A-9D10-2E5F6A7B8C90",
      "pattern": "[A-Za-z0-9._~:-]{1,128}"
    }
  },
  "sources": {
    "reminders": {
      "kind": "reminders",
      "show": "all",
      "list_ids": [
        "{param.list}"
      ]
    }
  },
  "cards": [
    {
      "id": "todos",
      "type": "checklist",
      "mark": "fill",
      "max_items": 15,
      "items": [],
      "source": {
        "ref": "reminders",
        "map": {
          "items": {
            "each": "items",
            "limit": 100,
            "fields": {
              "text": {
                "if": {
                  "path": "priority_mark",
                  "not": ""
                },
                "then": {
                  "template": "{priority_mark} {title}"
                },
                "else": {
                  "template": "{title}"
                }
              },
              "detail": {
                "template": "{info_short}"
              },
              "done": "done",
              "badge": {
                "if": {
                  "path": "repeats",
                  "equals": true
                },
                "then": {
                  "template": "arrow.clockwise"
                },
                "else": {
                  "template": ""
                }
              },
              "badge_at": {
                "template": "end"
              },
              "badge_label": {
                "template": "Repeating"
              },
              "section": "group"
            }
          }
        },
        "empty": {
          "when": {
            "path": "count",
            "equals": 0
          },
          "text": "{empty}"
        }
      },
      "itemAction": {
        "kind": "complete-reminder",
        "label": "Complete",
        "icon": "checkmark"
      }
    },
    {
      "id": "more-reminders",
      "type": "text",
      "tone": "info",
      "body": "This page shows the list's first 100 reminders. Open Reminders for the rest.",
      "source": {
        "ref": "reminders",
        "when": {
          "path": "count",
          "gt": 100
        }
      }
    }
  ]
}
