How do I use references in theorems?

I’m currently using the package ctheorems:1.1.3

I was looking at this page for help: ctheorems – Typst Universe

There they gave this example.

#theorem("Euclid")[
  There are infinitely many primes.
]

I would like to be able to write something like

#theorem("Euclid" @elements)[
  There are infinitely many primes.
]

and have the @elements render as the number in my bibliography corresponding to the entry for Euclid’s Elements. Is this possible?

You can just replace "Euclid" with [Euclid @elements].

Here is an example which uses great-theorems instead of ctheorems.

#import "@preview/great-theorems:0.1.1": *

#show: great-theorems-init

#let theorem = mathblock(
  blocktitle: "Theorem",
)
#theorem(title: [Euclid @elements])[
  There are infinitely many primes.
]