Another one bites the dust. A few months after Toys R Us filed for bankruptcy, the toy retailer announced on Wednesday that it will close or sell all its stores in the U.S. The company is buried under a mountain of debt, the result of a leveraged buyout gone wrong in 2005. Debt is the enemy of retailers looking to survive in the age of Amazon and e-commerce.

Toys R Us accounts for about 15% of U.S. toy sales. In the long run, those sales will be distributed across other retailers that sell toys, including online retailers. In the near term, though, the failure of Toys R Us could be a major problem for toymakers Mattel (MAT -0.66%) and Hasbro (HAS 0.60%). Here's how important the terminal retailer is for these two toy companies.

A top three customer disappears

For both Mattel and Hasbro, three retailers account for a substantial portion of sales. Walmart, Toys R Us, and Target are the big three when it comes to toy retail. Walmart is the largest customer of both companies by a wide margin. That's a silver lining because the megaretailer is doing quite well.

Here's how these three retailers stack up for both Mattel and Hasbro as a percentage of total sales in 2017:

A chart showing what percentage of 2017 revenue for Mattel and Hasbro was derived from Walmart, Target, and Toys R Us.

Chart by author. Data source: Mattel and Hasbro.

Both toymakers rely on Toys R Us for 8%-9% of annual sales. For Hasbro, the percentage was the same in 2016. But Mattel reduced shipping to Toys R Us in early September of last year, reducing its revenue in the second half. In 2016, Mattel counted on Toys R Us for 11% of revenue.

It's difficult to say at this point how sales at Toys R Us will be redistributed. Walmart and Target may win some additional market share, making both Mattel and Hasbro even more dependent on those two retailers. Amazon's toy business will almost certainly benefit, which could have the effect of pushing down toy prices as the e-commerce giant aggressively goes after market share. That could take a bite out of Mattel's and Hasbro's margins.

Both companies expect the Toys R Us failure to have negative impacts on their businesses. In Mattel's annual 10-K filing, the company states: "If Toys R Us were unsuccessful with their Chapter 11 reorganization, it could lead to potential adverse effects on Mattel's business, financial condition and results of operations, including its ability to collect its trade receivables."

In Hasbro's 10-K filing: "We expect the ongoing financial situation with Toys R Us, including its difficulties in the United Kingdom, will negatively impact our sales in 2018, with the greatest amount of that impact likely to be in the first half of 2018, and potentially for additional periods, based on the level of store closures and how much the sales lost through Toys R Us are picked up by other retail and e-commerce channels."

Both 10-Ks were filed prior to Toys R Us announcing its liquidation.

Mattel will be hit hardest

Despite Hasbro being a bit more dependent on Toys R Us than Mattel, the retail chain's failure compounds other problems that Mattel has been dealing with for years. Revenue and earnings have been slumping since 2013, the result of weak demand for its core products and the aftermath of years of bureaucracy and slow decision-making that hobbled the company's ability to adapt.

Mattel's revenue in 2017 was down 25% compared to 2013. It posted an operating loss of $343 million for the year, down from an operating profit of $1.17 billion four years prior. Even without the Toys R Us liquidation, Mattel still would be having serious issues.

Hasbro, on the other hand, has seen revenue and operating income consistently grow over the past few years. Growth slowed down in 2017, but the company's operating margin is right around its high for the decade. Hasbro will certainly take a hit in 2018 as Toys R Us closes its stores, but it should have no problem weathering the storm.

If you're a Hasbro investor, the Toys R Us failure is a minor issue in the long run. If you're a Mattel investor, this is another major setback that will lengthen the time it takes for the company to return to growth and profitability.