What a lousy timing.. !!
What size is the drive? The samsung 1TB is more temperamental than the 2TB WD green.
When the hard drive was replaced on your iMac do you still have most of your files on that.. it should be returned to you with the computer.. that is one source.
How is the date stored on the TC? Did you copy it across and store it directly on the disk or just in TM backups.. The former are much easier to recover than the later..
Did you have files on the TC without backups??
You may be faced with a hefty cost .. but the first step is to cool down the TC for several hours.. leave it off.. when it boots up do you get a drive error??
If it boots and runs start copying those files off.. immediately .. don't stop.. you might have just a few minutes so pick quickly what you need.
If it doesn't work over ethernet try it by wireless. Or visa versa..
If it fails or even refuses to boot..
You will need to remove the hard disk. See https://www.ifixit.com/Device/Apple_Time_Capsule
Put the disk in standard 3.5" sata enclosure.. they are cheap as from online store.. ebay or major computer stores.
Plug it into the Mac via the USB and see if you can read it.
Tell me what you see.. there should be 3 partitions.. APconfig APswap and data (you might have renamed this).
Mostly people can see the two tiny config and swap but the main data is lost due to format / disk errors etc.
A software like Data Rescue can sometimes recover the files.. download the trial and give it a go..
Otherwise it has to go to a recovery centre and you will lighten your bank account of considerable sums.