{
    "tailapp": 2,
    "manifest": {
        "format": 2,
        "app_id": "reading-list",
        "name": "Reading List",
        "version": 1,
        "schema": "tailapps/v0",
        "exported_at": 1795564617,
        "from": "gallery",
        "connections": [],
        "files": {
            "app.json": "da3cfe9e856ce643374907d774a4ceb05cf4c48883106a1ed76468dc598d94c9"
        },
        "signature": "E04Zt5Wrj6yG2zvvQwRjZEiy1U3JNhy0wJYR3B3rqmvIwdBx5YT+ag9Od0tw12DqJzmP18ldI1uM2/6U0N5aDA==",
        "key_id": "gallery-1"
    },
    "app": {
        "schema": "tailapps/v0",
        "app": "reading-list",
        "name": "Reading List",
        "description": "Things to read, in two tabs. Swipe a row to mark it read or delete it (with Undo), right-click or long press to rename or file it, pull down on the iPhone to refresh.",
        "icon": "books.vertical",
        "version": 1,
        "permissions": [],
        "state": {
            "links": {
                "type": "list",
                "default": [
                    {
                        "id": "1",
                        "title": "The Pragmatic Programmer, chapter 3",
                        "shelf": "Books",
                        "done": false
                    },
                    {
                        "id": "2",
                        "title": "Swift concurrency in practice",
                        "shelf": "Articles",
                        "done": false
                    },
                    {
                        "id": "3",
                        "title": "Laravel 13 release notes",
                        "shelf": "Articles",
                        "done": false
                    },
                    {
                        "id": "4",
                        "title": "Designing Data-Intensive Applications",
                        "shelf": "Books",
                        "done": true
                    }
                ]
            }
        },
        "actions": {
            "add": {
                "steps": [
                    {
                        "ask": {
                            "title": "Add to your reading list",
                            "message": "What do you want to read?",
                            "input": "text"
                        },
                        "as": "title"
                    },
                    {
                        "if": "$title",
                        "then": [
                            {
                                "push": {
                                    "links": {
                                        "id": "{$now}-{$links | count}",
                                        "title": "$title",
                                        "shelf": "Inbox",
                                        "done": false
                                    }
                                },
                                "at": "front"
                            },
                            {
                                "toast": "Added"
                            }
                        ]
                    }
                ]
            },
            "mark_read": {
                "steps": [
                    {
                        "update": {
                            "links": {
                                "match": {
                                    "id": "$args.item.id"
                                },
                                "set": {
                                    "done": true
                                }
                            }
                        }
                    },
                    {
                        "toast": "Marked as read"
                    }
                ]
            },
            "mark_unread": {
                "steps": [
                    {
                        "update": {
                            "links": {
                                "match": {
                                    "id": "$args.item.id"
                                },
                                "set": {
                                    "done": false
                                }
                            }
                        }
                    }
                ]
            },
            "remove_link": {
                "steps": [
                    {
                        "remove": {
                            "links": {
                                "match": {
                                    "id": "$args.item.id"
                                }
                            }
                        }
                    },
                    {
                        "toast": {
                            "text": "Deleted \u201c{$args.item.title}\u201d",
                            "undo": "restore",
                            "args": {
                                "id": "$args.item.id",
                                "title": "$args.item.title",
                                "shelf": "$args.item.shelf",
                                "done": "$args.item.done"
                            }
                        }
                    }
                ]
            },
            "restore": {
                "args": {
                    "id": "text",
                    "title": "text",
                    "shelf": "text",
                    "done": "bool"
                },
                "steps": [
                    {
                        "push": {
                            "links": {
                                "id": "$args.id",
                                "title": "$args.title",
                                "shelf": "$args.shelf",
                                "done": "$args.done"
                            }
                        },
                        "at": "front"
                    }
                ]
            },
            "rename": {
                "args": {
                    "id": "text",
                    "title": "text"
                },
                "steps": [
                    {
                        "ask": {
                            "title": "Rename",
                            "input": "text",
                            "default": "$args.title"
                        },
                        "as": "name"
                    },
                    {
                        "if": "$name",
                        "then": [
                            {
                                "update": {
                                    "links": {
                                        "match": {
                                            "id": "$args.id"
                                        },
                                        "set": {
                                            "title": "$name"
                                        }
                                    }
                                }
                            }
                        ]
                    }
                ]
            },
            "move": {
                "args": {
                    "id": "text"
                },
                "steps": [
                    {
                        "ask": {
                            "title": "Move to",
                            "choices": [
                                "Inbox",
                                "Books",
                                "Articles",
                                "Videos"
                            ]
                        },
                        "as": "shelf"
                    },
                    {
                        "update": {
                            "links": {
                                "match": {
                                    "id": "$args.id"
                                },
                                "set": {
                                    "shelf": "$shelf"
                                }
                            }
                        }
                    },
                    {
                        "toast": "Moved to {$shelf}"
                    }
                ]
            }
        },
        "cards": [
            {
                "id": "main",
                "layout": {
                    "column": [
                        {
                            "tabs": [
                                {
                                    "label": "To read",
                                    "icon": "book",
                                    "count": "$links | where:{done:false} | count",
                                    "children": [
                                        {
                                            "column": [
                                                {
                                                    "list": "$links | where:{done:false}",
                                                    "empty": "Nothing to read. Add something.",
                                                    "group": "$item.shelf",
                                                    "swipe": {
                                                        "leading": [
                                                            {
                                                                "label": "Read",
                                                                "icon": "checkmark",
                                                                "hue": "green",
                                                                "on": "mark_read"
                                                            }
                                                        ],
                                                        "trailing": [
                                                            {
                                                                "label": "Delete",
                                                                "icon": "trash",
                                                                "style": "destructive",
                                                                "on": "remove_link"
                                                            }
                                                        ]
                                                    },
                                                    "item": {
                                                        "cell": "$item.title",
                                                        "subtitle": "$item.shelf",
                                                        "leading": "book",
                                                        "context_menu": [
                                                            {
                                                                "label": "Rename\u2026",
                                                                "icon": "pencil",
                                                                "on": "rename",
                                                                "args": {
                                                                    "id": "$item.id",
                                                                    "title": "$item.title"
                                                                }
                                                            },
                                                            {
                                                                "label": "Move to\u2026",
                                                                "icon": "folder",
                                                                "on": "move",
                                                                "args": {
                                                                    "id": "$item.id"
                                                                }
                                                            }
                                                        ]
                                                    }
                                                }
                                            ],
                                            "style": "inset"
                                        }
                                    ]
                                },
                                {
                                    "label": "Read",
                                    "icon": "checkmark.circle",
                                    "children": [
                                        {
                                            "column": [
                                                {
                                                    "list": "$links | where:{done:true}",
                                                    "empty": "Nothing read yet",
                                                    "swipe": {
                                                        "leading": [
                                                            {
                                                                "label": "Unread",
                                                                "icon": "arrow.uturn.backward",
                                                                "hue": "blue",
                                                                "on": "mark_unread"
                                                            }
                                                        ],
                                                        "trailing": [
                                                            {
                                                                "label": "Delete",
                                                                "icon": "trash",
                                                                "style": "destructive",
                                                                "on": "remove_link"
                                                            }
                                                        ]
                                                    },
                                                    "item": {
                                                        "cell": "$item.title",
                                                        "subtitle": "$item.shelf",
                                                        "leading": "book",
                                                        "context_menu": [
                                                            {
                                                                "label": "Rename\u2026",
                                                                "icon": "pencil",
                                                                "on": "rename",
                                                                "args": {
                                                                    "id": "$item.id",
                                                                    "title": "$item.title"
                                                                }
                                                            },
                                                            {
                                                                "label": "Move to\u2026",
                                                                "icon": "folder",
                                                                "on": "move",
                                                                "args": {
                                                                    "id": "$item.id"
                                                                }
                                                            }
                                                        ]
                                                    }
                                                }
                                            ],
                                            "style": "inset"
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "gap": "m"
                },
                "footer": {
                    "row": [
                        {
                            "text": "{$links | where:{done:false} | count} to read",
                            "size": "s",
                            "emphasis": "subtle"
                        },
                        {
                            "spacer": true
                        },
                        {
                            "button": "Add",
                            "icon": "plus",
                            "style": "plain",
                            "on": "add"
                        }
                    ],
                    "align": "center"
                }
            }
        ],
        "views": {
            "menubar": {
                "icon": "books.vertical",
                "label": "{$links | where:{done:false} | count}",
                "in_menu": "card"
            },
            "floating": {
                "card": "main",
                "width": "default"
            }
        }
    },
    "app_json": "{\n  \"schema\": \"tailapps/v0\",\n  \"app\": \"reading-list\",\n  \"name\": \"Reading List\",\n  \"description\": \"Things to read, in two tabs. Swipe a row to mark it read or delete it (with Undo), right-click or long press to rename or file it, pull down on the iPhone to refresh.\",\n  \"icon\": \"books.vertical\",\n  \"version\": 1,\n  \"permissions\": [],\n  \"state\": {\n    \"links\": {\n      \"type\": \"list\",\n      \"default\": [\n        {\n          \"id\": \"1\",\n          \"title\": \"The Pragmatic Programmer, chapter 3\",\n          \"shelf\": \"Books\",\n          \"done\": false\n        },\n        {\n          \"id\": \"2\",\n          \"title\": \"Swift concurrency in practice\",\n          \"shelf\": \"Articles\",\n          \"done\": false\n        },\n        {\n          \"id\": \"3\",\n          \"title\": \"Laravel 13 release notes\",\n          \"shelf\": \"Articles\",\n          \"done\": false\n        },\n        {\n          \"id\": \"4\",\n          \"title\": \"Designing Data-Intensive Applications\",\n          \"shelf\": \"Books\",\n          \"done\": true\n        }\n      ]\n    }\n  },\n  \"actions\": {\n    \"add\": {\n      \"steps\": [\n        {\n          \"ask\": {\n            \"title\": \"Add to your reading list\",\n            \"message\": \"What do you want to read?\",\n            \"input\": \"text\"\n          },\n          \"as\": \"title\"\n        },\n        {\n          \"if\": \"$title\",\n          \"then\": [\n            {\n              \"push\": {\n                \"links\": {\n                  \"id\": \"{$now}-{$links | count}\",\n                  \"title\": \"$title\",\n                  \"shelf\": \"Inbox\",\n                  \"done\": false\n                }\n              },\n              \"at\": \"front\"\n            },\n            {\n              \"toast\": \"Added\"\n            }\n          ]\n        }\n      ]\n    },\n    \"mark_read\": {\n      \"steps\": [\n        {\n          \"update\": {\n            \"links\": {\n              \"match\": {\n                \"id\": \"$args.item.id\"\n              },\n              \"set\": {\n                \"done\": true\n              }\n            }\n          }\n        },\n        {\n          \"toast\": \"Marked as read\"\n        }\n      ]\n    },\n    \"mark_unread\": {\n      \"steps\": [\n        {\n          \"update\": {\n            \"links\": {\n              \"match\": {\n                \"id\": \"$args.item.id\"\n              },\n              \"set\": {\n                \"done\": false\n              }\n            }\n          }\n        }\n      ]\n    },\n    \"remove_link\": {\n      \"steps\": [\n        {\n          \"remove\": {\n            \"links\": {\n              \"match\": {\n                \"id\": \"$args.item.id\"\n              }\n            }\n          }\n        },\n        {\n          \"toast\": {\n            \"text\": \"Deleted \u201c{$args.item.title}\u201d\",\n            \"undo\": \"restore\",\n            \"args\": {\n              \"id\": \"$args.item.id\",\n              \"title\": \"$args.item.title\",\n              \"shelf\": \"$args.item.shelf\",\n              \"done\": \"$args.item.done\"\n            }\n          }\n        }\n      ]\n    },\n    \"restore\": {\n      \"args\": {\n        \"id\": \"text\",\n        \"title\": \"text\",\n        \"shelf\": \"text\",\n        \"done\": \"bool\"\n      },\n      \"steps\": [\n        {\n          \"push\": {\n            \"links\": {\n              \"id\": \"$args.id\",\n              \"title\": \"$args.title\",\n              \"shelf\": \"$args.shelf\",\n              \"done\": \"$args.done\"\n            }\n          },\n          \"at\": \"front\"\n        }\n      ]\n    },\n    \"rename\": {\n      \"args\": {\n        \"id\": \"text\",\n        \"title\": \"text\"\n      },\n      \"steps\": [\n        {\n          \"ask\": {\n            \"title\": \"Rename\",\n            \"input\": \"text\",\n            \"default\": \"$args.title\"\n          },\n          \"as\": \"name\"\n        },\n        {\n          \"if\": \"$name\",\n          \"then\": [\n            {\n              \"update\": {\n                \"links\": {\n                  \"match\": {\n                    \"id\": \"$args.id\"\n                  },\n                  \"set\": {\n                    \"title\": \"$name\"\n                  }\n                }\n              }\n            }\n          ]\n        }\n      ]\n    },\n    \"move\": {\n      \"args\": {\n        \"id\": \"text\"\n      },\n      \"steps\": [\n        {\n          \"ask\": {\n            \"title\": \"Move to\",\n            \"choices\": [\n              \"Inbox\",\n              \"Books\",\n              \"Articles\",\n              \"Videos\"\n            ]\n          },\n          \"as\": \"shelf\"\n        },\n        {\n          \"update\": {\n            \"links\": {\n              \"match\": {\n                \"id\": \"$args.id\"\n              },\n              \"set\": {\n                \"shelf\": \"$shelf\"\n              }\n            }\n          }\n        },\n        {\n          \"toast\": \"Moved to {$shelf}\"\n        }\n      ]\n    }\n  },\n  \"cards\": [\n    {\n      \"id\": \"main\",\n      \"layout\": {\n        \"column\": [\n          {\n            \"tabs\": [\n              {\n                \"label\": \"To read\",\n                \"icon\": \"book\",\n                \"count\": \"$links | where:{done:false} | count\",\n                \"children\": [\n                  {\n                    \"column\": [\n                      {\n                        \"list\": \"$links | where:{done:false}\",\n                        \"empty\": \"Nothing to read. Add something.\",\n                        \"group\": \"$item.shelf\",\n                        \"swipe\": {\n                          \"leading\": [\n                            {\n                              \"label\": \"Read\",\n                              \"icon\": \"checkmark\",\n                              \"hue\": \"green\",\n                              \"on\": \"mark_read\"\n                            }\n                          ],\n                          \"trailing\": [\n                            {\n                              \"label\": \"Delete\",\n                              \"icon\": \"trash\",\n                              \"style\": \"destructive\",\n                              \"on\": \"remove_link\"\n                            }\n                          ]\n                        },\n                        \"item\": {\n                          \"cell\": \"$item.title\",\n                          \"subtitle\": \"$item.shelf\",\n                          \"leading\": \"book\",\n                          \"context_menu\": [\n                            {\n                              \"label\": \"Rename\u2026\",\n                              \"icon\": \"pencil\",\n                              \"on\": \"rename\",\n                              \"args\": {\n                                \"id\": \"$item.id\",\n                                \"title\": \"$item.title\"\n                              }\n                            },\n                            {\n                              \"label\": \"Move to\u2026\",\n                              \"icon\": \"folder\",\n                              \"on\": \"move\",\n                              \"args\": {\n                                \"id\": \"$item.id\"\n                              }\n                            }\n                          ]\n                        }\n                      }\n                    ],\n                    \"style\": \"inset\"\n                  }\n                ]\n              },\n              {\n                \"label\": \"Read\",\n                \"icon\": \"checkmark.circle\",\n                \"children\": [\n                  {\n                    \"column\": [\n                      {\n                        \"list\": \"$links | where:{done:true}\",\n                        \"empty\": \"Nothing read yet\",\n                        \"swipe\": {\n                          \"leading\": [\n                            {\n                              \"label\": \"Unread\",\n                              \"icon\": \"arrow.uturn.backward\",\n                              \"hue\": \"blue\",\n                              \"on\": \"mark_unread\"\n                            }\n                          ],\n                          \"trailing\": [\n                            {\n                              \"label\": \"Delete\",\n                              \"icon\": \"trash\",\n                              \"style\": \"destructive\",\n                              \"on\": \"remove_link\"\n                            }\n                          ]\n                        },\n                        \"item\": {\n                          \"cell\": \"$item.title\",\n                          \"subtitle\": \"$item.shelf\",\n                          \"leading\": \"book\",\n                          \"context_menu\": [\n                            {\n                              \"label\": \"Rename\u2026\",\n                              \"icon\": \"pencil\",\n                              \"on\": \"rename\",\n                              \"args\": {\n                                \"id\": \"$item.id\",\n                                \"title\": \"$item.title\"\n                              }\n                            },\n                            {\n                              \"label\": \"Move to\u2026\",\n                              \"icon\": \"folder\",\n                              \"on\": \"move\",\n                              \"args\": {\n                                \"id\": \"$item.id\"\n                              }\n                            }\n                          ]\n                        }\n                      }\n                    ],\n                    \"style\": \"inset\"\n                  }\n                ]\n              }\n            ]\n          }\n        ],\n        \"gap\": \"m\"\n      },\n      \"footer\": {\n        \"row\": [\n          {\n            \"text\": \"{$links | where:{done:false} | count} to read\",\n            \"size\": \"s\",\n            \"emphasis\": \"subtle\"\n          },\n          {\n            \"spacer\": true\n          },\n          {\n            \"button\": \"Add\",\n            \"icon\": \"plus\",\n            \"style\": \"plain\",\n            \"on\": \"add\"\n          }\n        ],\n        \"align\": \"center\"\n      }\n    }\n  ],\n  \"views\": {\n    \"menubar\": {\n      \"icon\": \"books.vertical\",\n      \"label\": \"{$links | where:{done:false} | count}\",\n      \"in_menu\": \"card\"\n    },\n    \"floating\": {\n      \"card\": \"main\",\n      \"width\": \"default\"\n    }\n  }\n}\n",
    "files": []
}