(defcomp
  ()
  (~examples/page-content
    :title "Edit Row"
    :description "Click edit to replace a table row with input fields. Save or cancel swaps back the display row. Uses sx-include to gather form values from the row."
    :demo-description "Click edit on any row to modify it inline."
    :demo (~examples/edit-row-demo
      :rows (list
        (list "1" "Widget A" "19.99" "142")
        (list "2" "Widget B" "24.50" "89")
        (list "3" "Widget C" "12.00" "305")
        (list "4" "Widget D" "45.00" "67")))
    :sx-code "(button\n  :sx-get \"/sx/(geography.(hypermedia.(example.(api.(editrow.1)))))\"\n  :sx-target \"#erow-1\"\n  :sx-swap \"outerHTML\"\n  \"edit\")\n\n;; Save sends form data via POST\n(button\n  :sx-post \"/sx/(geography.(hypermedia.(example.(api.(editrow.1)))))\"\n  :sx-target \"#erow-1\"\n  :sx-swap \"outerHTML\"\n  :sx-include \"#erow-1\"\n  \"save\")"
    :handler-names (list "ex-editrow-form" "ex-editrow-save")
    :comp-placeholder-id "editrow-comp"
    :wire-placeholder-id "editrow-wire"))
