Vice President Mike Pence said Sunday that "of course" the Trump administration believes migrant children being held at detention facilities should have access to soap, toothbrushes and other basic amenities, comments that come just days after the administration went to court to argue against having to provide the children with such things.

"Of course we do," Pence told CNN's "State of the Union" on Sunday. "My point is it's all a part of the appropriations process. Congress needs to provide additional support to deal with the crisis at our southern border."

Pence added that "we've got to get to the root causes" of migration, pointing to immigration "loopholes" before citing the administration's recent agreement with Mexico to curb the flow of migration.

Last week, a hearing before a panel of judges at the 9th U.S. Circuit Court of Appeals went viral after a Justice Department lawyer, Sarah Fabian, argued that the government should not be required to provide detained migrant children with soap, toothbrushes, showers and other amenities at Customs and Border Protection's detention facilities.

The argument stunned judges, who asked the attorney whether the government could describe conditions at the detention centers as "safe and sanitary" if the children were not provided with such basic toiletries and sleeping conditions.

“To me it’s more like it’s within everybody’s common understanding: If you don’t have a toothbrush, if you don’t have soap, if you don’t have a blanket, it’s not safe and sanitary,” Judge A. Wallace Tashima said. "Wouldn’t everybody agree to that? Would you agree to that?”

Fabian conceded that "those things may be" part of the definition of safe and sanitary conditions.

Speaking on Sunday, Pence said he could not "speak to what that lawyer was saying," adding that "one of the reasons" the administration sought more bed spaces in the facilities earlier this year was to improve conditions. Democrats wanted to cap the number of beds in the detention facilities so that the administration would prioritize criminals and stop the detention of undocumented immigrants who otherwise have not broken the law.

When CNN's Jake Tapper pointed out to Pence that the conditions at the facilities have led to health crises, Pence said, "No American should approve of this mass influx of people coming across our border" and called the scene at detention centers "heartbreaking."

The government was in court last week to appeal a 2017 ruling in a case dating to the Obama administration that migrants were detained in unsanitary conditions. As The New York Times reported last week, "A chaotic scene of sickness and filth is unfolding in an overcrowded border station in Clint, Tex., where hundreds of young people who have recently crossed the border are being held," according to lawyers who visited the facility.

A CBP official said in statement Sunday that it "leverages our limited resources to provide the best care possible to those in our custody, especially children."

"As DHS and CBP leadership have noted numerous times, our short-term holding facilities were not designed to hold vulnerable populations and we urgently need additional humanitarian funding to manage this crisis," the official said. "CBP works closely with our partners at the Department of Health and Human Services to transfer unaccompanied children to their custody as soon as placement is identified, and as quickly and expeditiously as possible to ensure proper care."

On CNN, former Housing and Urban Development Secretary Juliàn Castro, a 2020 Democratic presidential candidate, said: "They can get a billion dollars or more for a wall, all of a sudden out of nowhere, but they can't afford soap and toothbrushes for children."

"It doesn't make any sense," he added.