(defcomp
  (&key value)
  (form
    :sx-post "/sx/(geography.(hypermedia.(example.(api.edit))))"
    :sx-target "#edit-target"
    :sx-swap "innerHTML"
    (~tw :tokens "flex items-center gap-2 p-3 rounded border border-violet-300 bg-violet-50")
    (input
      :type "text"
      :name "value"
      :value value
      (~tw :tokens "flex-1 px-3 py-1.5 border border-stone-300 rounded text-sm focus:outline-none focus:ring-2 focus:ring-violet-500"))
    (button
      :type "submit"
      (~tw :tokens "px-3 py-1.5 bg-violet-600 text-white rounded text-sm hover:bg-violet-700")
      "save")
    (button
      :type "button"
      :sx-get (str
        "/sx/(geography.(hypermedia.(example.(api.edit-cancel))))?value="
        value)
      :sx-target "#edit-target"
      :sx-swap "innerHTML"
      (~tw :tokens "px-3 py-1.5 bg-stone-200 text-stone-700 rounded text-sm hover:bg-stone-300")
      "cancel")))
