This is the 12260th most frequent Turkish word.
halindeyken
"Halindeyken" means "while in the state/condition of."
In this sentence, "halindeyken" is used to refer to a temporary state or situation, namely, the state of having their wedding.
Arkadaşlarım düğün halindeyken onları ziyaret ettim.
I visited my friends when they were in the state of having their wedding.
Here, "halindeyken" indicates the condition of rain and mud impacting the outdoors.
Yağmur çamur halindeyken dışarı çıkmak istemem.
I don't want to go out when it's in a rainy and muddy condition.
In this context, "halindeyken" refers to the ongoing state of the book being in the process of writing.