{"body":"use Air::Functional :BASE;\nuse Air::Base;\nuse Air::Component;\n\nmy &index = &page.assuming( #:REFRESH(5),\n    title       => 'hÅrc',\n    description => 'HTMX, Air, Red, Cro',\n    footer      => footer p ['Aloft on ', b 'Åir'],\n);\n\nclass Downloader does Component {\n    has Int $.count = 0;\n\n    method download is controller {\n        do the download\n\t\treturn some HTML\n    }\n\n    method hx-download(--> Hash()) {\n        :hx-get(\"downloader/$.id/download\"),\n        :hx-target(\"#downloader-$.id\"),\n        :hx-swap<outerHTML>,\n        :hx-trigger<submit>,\n    }\n\n    method HTML {\n        button :id(\"downloader-$.id\"),\n    }\n}\n\nmy $downloader = Downloader;\n\nsub SITE is export {\n    site :register[$downloader], #:theme-color<red>,\n        index\n            main\n                form |$downloader.hx-download, [\n                    h3 'Download:';\n                    ~$downloader;\n                    button :type<submit>, '+';\n                ]\n}","name":"","extension":"txt","url":"https://www.irccloud.com/pastebin/pMDIrWAd","modified":1760709512,"id":"pMDIrWAd","size":951,"lines":42,"own_paste":false,"theme":"","date":1760709512}