By Niv Elis and Jordain Carney, The Hill–

Lawmakers are set to introduce legislation Wednesday detailing a border security deal that they hope will prevent a partial government shutdown later this week.

Whether President Trump will sign the measure is unclear, especially following Tuesday’s remarks that he is “not happy” with the compromise. Conservatives have panned the deal, but Senate Majority Leader Mitch McConnell (R-Ky.) is publicly urging the president to sign it, and Speaker Nancy Pelosi (D-Calif.) is expected to have the House vote on the bill as soon as Wednesday.

Still, lawmakers and their staffs are frantically finalizing details on divisive issues such as Trump’s proposed U.S.-Mexico border wall and Immigration and Customs Enforcement (ICE) detention beds.

Here’s what we know so far about the deal.

Physical barriers

The deal includes $1.375 billion to build 55 miles of barriers along the border in the Rio Grande Valley.

That amount is well below the $5.7 billion Trump has been demanding in recent weeks, but the goal posts around the issue have evolved substantially over time. When Trump made his initial funding request last year, he asked for $1.6 billion. He later increased that request to $5 billion, and in doing so railed against Senate appropriators for sticking to the original amount in their Homeland Security bill. That legislation, which did not get a vote in the Senate but advanced with overwhelming bipartisan support in committee, specified the funds would cover 65 miles of pedestrian fencing in the Rio Grande Valley.

Republicans are characterizing this week’s agreement as a “down payment” on Trump’s proposed wall. Sen. John Thune (S.D.), the No. 2 GOP senator, said the deal represented “the best that could be achieved; it is a down payment on wall funding.”

Trump has said he will need $25 billion over time to build a border wall stretching hundreds of miles. The White House has not ruled out declaring a national emergency or trying to shift money around to get more than $1.375 billion for the wall this fiscal year, which ends on Sept. 30.

Senior congressional aides say this week’s bill would allow for steel slats, a term floated publicly by Trump. But other sources said the barriers would be bollard fencing, with a prohibition on using the funds to build a concrete wall.

ICE detention beds

Democrats want to limit the number of beds ICE could use, arguing that fewer beds would force the federal agency to focus on detaining immigrants who have committed felonies or pose a security risk rather than those who have overstayed visas or committed minor crimes.

They say the deal reduces the number of beds from 49,057 to 40,520 through the end of the year, a 17 percent reduction. That figure is still well above the opening offer Democrats made, which would have reduced beds to 35,520 and phased out family detention.

GOP sources and lawmakers insist that the cap is a soft one and that the administration could fund thousands more beds. Senior congressional aides say the agreement funds an average of 45,000 detention beds through Sept. 30, and would afford the administration “flexibility” to provide as many as 52,000 beds.

GOP senators said Tuesday that they thought the agreement could go even further, funding up to 58,000 beds. Sen. Lindsey Graham (R-S.C.) added that the Republican briefing on the deal indicated it would allow for an extra $750 million through reprogramming for additional ICE detention bed space.

“I’d like to look at the language,” he said. “If that’s true that would alleviate my biggest concern.”

Democratic sources counter that while the administration could transfer or reprogram funds on that level, it would require moving them out of Homeland Security’s general operations fund or using tools designed for emergency situations, which could leave the department short on cash in the event of an emergency.

Disaster aid

Negotiators said they put off the question of disaster aid, which had become a sticking point in the funding negotiations.

The accumulated damage from two years of hurricanes, floods and wildfires has created a need for massive levels of disaster aid. Democrats have proposed adding $7.2 billion in disaster relief funding to help recovery efforts from hurricanes in Texas and Florida, as well as wildfires in California.

One of the main points of contention was how much aid to give to Puerto Rico, which is still recovering from Hurricane Maria’s devastating effects from when it made landfall in 2017.

Before Democrats took control of the House last month, Republicans included $7.8 billion for disaster aid in a December spending package that ultimately failed in the Senate. Democrats passed their own disaster aid package to the tune of $12.1 billion. That measure never made it through the GOP-controlled Senate.

Additional spending bills

The long, contentious journey to reach the spending deal was focused mainly on Department of Homeland Security (DHS) funding, but that was just one of seven appropriations bills that have not yet been passed by Congress.

In addition to DHS, the agreement will tie up six unrelated appropriations bills: Agriculture; Commerce, Justice and Science; Financial Services; Interior and Environment; State and foreign operations; and Transportation, Housing and Urban Development.

A congressional aide said the six bills include a $1 billion increase for the 2020 census, a $30 million increase in funding to combat the country’s opioid epidemic and a 1.9 percent pay increase for federal workers.

It will also consist of a $1.2 billion increase in infrastructure spending that includes $725 million for highways and bridges, $300 million for a new port infrastructure program and $150 million for bus and rail improvements, according to the source.

“Each contains more support for programs to help the American people – additional funding for infrastructure, housing, money to combat the opioid crisis and more,” Senate Minority Leader Charles Schumer (D-N.Y.) said from the Senate floor about the six non-DHS bills.