My parents put our dog down when I was about nine, when I was at school. They didn't tell me beforehand, only after the fact, when I got home and was looking for her.
Them not warning me hurt so bad, it was hard to take that along with losing the dog we'd had my whole life!
She had been smelly and weak and incontinent for a while, so I'd been sort of keeping my distance. I felt guilty about that for years.
And knowing after the fact that I could have had a chance to think to say some sort of goodbye, but my parents didn't give me that chance?
I'm not sure if I'm recommending this idea, but this is what I decided (at some point later in my childhood) I'd wished they had done:
A week ahead, explain that she is very sick, and in pain, and will die soon.
Right before It happens, remind me that she will definitely die soon, so it will occur to me to give her some extra love on my way out the door to school.
When I get home, tell me she died.
I liked the idea of having some warning, and not having to decide whether I wanted to be there for the euthanasia or not. At the age I was, anyway, the idea of my parents killing our dog just broke my heart- I wished like anything that I didn't know it was their decision.
Today, I think the way you handle it should be entirely about your individual dd and where she's at.
Some kids will do okay knowing the whole story, and being there for everything, and gain what there is to be gained from the experience, and others could be completely devestated by even the first suggestion of what is coming.
I'm a big fan of telling kids the truth as much as possible, but every so often it feels like some truths can wait, or aren't important enough to share, based on the pain they can cause. It all depends on the circumstances and the kiddo.
It's so hard, all around. I'll be thinking of you.