(defcomp
  (&key
    (title :as string)
    (description :as string)
    demo
    (example-code :as string)
    (handler-code :as string?)
    (wire-placeholder-id :as string?))
  (~docs/page
    :title title
    (p (~tw :tokens "text-stone-600 mb-6") description)
    (when demo (~examples/card :title "Demo" (~examples/demo demo)))
    (h3 (~tw :tokens "text-lg font-semibold text-stone-700 mt-6") "S-expression")
    (~examples/source :src-code (highlight example-code "lisp"))
    (when
      handler-code
      (<>
        (h3
          (~tw :tokens "text-lg font-semibold text-stone-700 mt-6")
          "Server handler")
        (~examples/source :src-code (highlight handler-code "lisp"))))
    (when
      wire-placeholder-id
      (<>
        (h3 (~tw :tokens "text-lg font-semibold text-stone-700 mt-6") "Wire response")
        (p
          (~tw :tokens "text-stone-500 text-sm mb-2")
          "Trigger the demo to see the raw response the server sends.")
        (~docs/placeholder :id wire-placeholder-id)))))
