Bestselling author Cecelia Ahern admits she worried having babies would make writing impossible. The Irish writer tells Hannah Stephenson how she’s made it work

Blonde, beautiful, happily married mother-of-two and bestselling author Cecelia Ahern has had the private and public success many of us dream about. The Dublin-born daughter of former Irish prime minister Bertie Ahern was just 21 when she penned her first novel, PS, I Love You, which became a bestseller and saw her life change in 2007 when the movie adaptation, starring Hilary Swank and Gerard Butler, became a box office hit.

Now Hollywood is knocking at her door again, as Warner Bros. have optioned the movie rights to her forthcoming young adult series, Flawed And Perfect, due out next March. "It's very exciting," she enthuses. "It feels like a new beginning and a fresh start, as it's a whole new audience. Getting the film deal was a real boost. It's the same team that made PS, I Love You."

Ahern, 34, has plenty to smile about. She is published in nearly 50 countries and has sold more than 25 million copies of her novels worldwide. Yet she has had dark times too, and recently spoke publicly about the panic attacks she suffered for years. "I don't know how many panic attacks I actually had, but I think the fear of having them is greater than the attack, because you're afraid of having one, and so that fear is constant and it's always there," she told Gay Byrne on his show The Meaning Of Life this year. "You get pins and needles, you get extremely dizzy, you might want to vomit, run to the toilet, just feeling cold, hot, it's bizarre actually that it's all created by yourself, it's all in your mind."

Today, she is more reluctant to talk about the issue. "It's a story I don't want to keep going on about. I was trying to explain where I was at when I wrote PS, I Love You. People couldn't understand how I could write a book like that at 21. At that time, I was at a vulnerable stage and very much trying to figure out who I was. It was something that I struggled with for a couple of years that made me very introspective and really made me think about what's going on in other people's minds - but everything's fine now.

"I don't get the panic attacks any more, but if somebody has them, the anxiety of having them is quite terrifying. It's more about being anxious about having panic attacks than actually having them. I've never had a character in my novels who's had panic attacks, but as a result of the experience of going through them, I've been able to put what you go through when you have them into my characters," she adds. "I always want to take them from somewhere dark and bring them to a lighter place."

Today, she would rather focus on her 12th novel, The Marble Collector, about a young woman named Sabrina who happens upon a collection of marbles in her father's possessions. She discovers that two of the most expensive collections are missing and sets out to find what happened to them, finding more out about her father and the secrets he kept in the process. It's a wider story which explores the father-daughter relationship.

"I got the idea from that phrase, 'I've lost my marbles'. It's something I say a lot as a busy mother."

She did extensive research into the history of marbles, and the valuations of rare types featured in the novel are real, she explains. "I get my ideas from experience, observation and imagination. I might take something that I've thought about for one moment in my life and turn it in to someone's biggest moment."

She has won numerous awards, including the Irish Book Award for Popular Fiction for The Year I Met You in 2014. But it was the success of her debut novel, the first of a £200,000 two-book deal, which set the ball rolling.

"It completely changed my life," she recalls. "I had just got a degree in journalism and media communications, was still living at home and it was time to start looking for a job. I wanted to do film production but decided to write PS, I Love You instead, as the idea was taking over my mind. All of a sudden, I had a career, I had to travel the world, I was published in 47 countries and I had a lot of responsibility. It was a two-book deal so I had to begin writing another book again.

"I think my way of coping with everything was just wanting to get back to my desk to write more stories. So I wrote one a year, sometimes two. It was overwhelming, but not in a negative way."

The hype was intense, but because of her father's political career, Ahern is no stranger to the spotlight. "Me and my sister – Georgina; married to Nicky Byrne of Westlife fame – were a lot more aware of other people, of being looked at," she has said. "It made us careful about who to trust and who not to trust."

Her forthcoming young adult series may be set for the big screen, but Ahern remains a novelist first and foremost. "I know only two of my books have been made into films, but there have been so many in development over the years and I have done so much work on other scripts that haven't yet made it."

Love, Rosie - the film version of her book Where Rainbows End - proved another hit in 2014. She has also created several TV series. including Samantha Who? starring Christina Applegate. But books remain her priority. "I have so much freedom to go where I want to go with my novels, and I know that with screenplays, there are so many drafts and collaborations, and it's more of a compromise."

She and her TV producer husband David Keoghan live in Malahide with their two children, five-year-old Robin and three-year-old Sonny. She works four days a week in an office near her home. "I was very concerned when I was pregnant that it was going to be impossible for me to write, but I've made it work. I switch my brain off when I'm with the children, and when I'm in my office, I create."

With such a busy schedule, Ahern admits it took her a while to start enjoying her success. "I took a year off when I had my first child, after six or seven books. I got married and that year, I let everything sink in and re-prioritised. Things changed after that. I now have a much better-work life balance."

  •  The Marble Collector by Cecelia Ahern (HarperCollins, £16.99)