Washington (CNN) Democratic and Republican leaders are making intricate political calculations ahead of a planned 12 p.m. ET vote in the Senate on whether to end the government shutdown.

Each side first has to decide whether the political costs and rewards of prolonging the showdown are greater than the costs and rewards of ending it.

Then, Democrats must ask themselves whether they have sufficient trust in Senate Majority Leader Mitch McConnell, R-Kentucky, and his assurances he will hold a key immigration debate if the government reopens and a funding deal is secured.

On the other side, Republicans in the Senate have to consider if there are any new steps they are prepared to take as they seek to pry open divisions between moderate and liberal Democrats in order to break down opposition to opening the government.

And President Donald Trump must decide whether, despite his self-image as a master dealmaker, he is willing to sit on the sidelines and watch as he is portrayed as an unreliable bit player in the drama.

Trump, who sources say has been watching the showdown unfold hour-by-hour on cable TV may also have to make a leap of faith if he wants to end the shutdown, and to steel himself to go against hardline advisers and his own political base to make concessions on immigration that Democrats want.

The President on Monday hit Democrats for being captives of their own most vehement supporters -- a criticism ironically that they have leveled at him -- in a potential sign he is not yet ready to soften his position.

"Democrats have shut down our government in the interests of their far left base. They don't want to do it but are powerless!" Trump tweeted

So far, both sides can claim to have won political benefits from the impasse that closed down the federal government on Friday at midnight.

Democrats can argue they stood firm against Trump on a key issue: the fate of 700,000 people brought to the US illegally as children and whether to extend their legal status, which they could lose in March.

The party's activist grass roots base had been fiercely critical of some of its Washington leaders for failing to do more to force the GOP into a deal to address the fate of those DACA recipients.

The Democratic stand came on a weekend when tens of thousands of activists took to the streets and held women's marches and rallies directed against Trump -- a sign of liberal engagement in mid-term election year.

Republicans spent the weekend taking political shots at Democrats, accusing them of closing down the government on an unrelated issue to funding federal programs. The tactic allowed Trump aides to stoke enthusiasm in his own political base and put pressure on Democratic senators facing re-election in states in November in states that Trump won in 2016.

A message to callers on the White House switchboard Sunday said Democrats were "holding government funding, including funding for our troops and other national security priorities hostage to an unrelated immigration debate."

But the costs of the shutdown and the political pressures on both sides are expected to rise significantly as the full force of the stalemate becomes clear as government operations remain silent at the start of the work week.

The Senate is due to vote at noon Monday on a bill to reopen the government and fund it for three weeks. It's unclear at this point whether the plan will win over sufficient Democrats to pass. Democrats have called for a funding extension of a matter of days to ensure momentum in negotiations is maintained.

Five Democrats in traditionally red states voted to keep the government open on Friday. Republican leaders will test on Monday whether those numbers will increase as the pressure mounts.

"This is their off ramp," a senior GOP aide involved in the talks told CNN's Phil Mattingly on Sunday night. "We'll see if they dig in or if they want a way out."

McConnell offered a guarantee on Sunday that if the DACA issue was not resolved by the end of a proposed interim funding period for the government on February 8, he would hold a full debate on the issue.

But Democrats must consider whether that assurance is sufficiently concrete for them to sell to base voters who are in uproar over DACA. It also appears uncertain whether the Republican-led House would follow suit if the Senate has a debate on the issue and passes legislation.

And the uncertainty over Trump's position will also weigh against a Democratic shift of position after he called for, and then rejected a previous bipartisan deal on immigration.

"The challenge is that Leader McConnell and Speaker Ryan have delegated this to the President and -- the President -- can he get to yes? We'll see whether he can," Maryland Democratic Sen. Ben Cardin told CNN's "New Day" Monday.

If the Democratic grassroots perceive that their Senate leaders have caved, there could be implications at the margins for their level of enthusiasm and willingness to mobilize in November.

At the same time, Democrats must bear in mind a CNN poll showing that, while there is overwhelming support for helping DACA recipients, 56% of Americans say it's not worth shutting the government down to do so.

The longer the shutdown drags on, the more red state Democrats -- like Sens. Joe Donnelly of Indiana, Joe Manchin of West Virginia, Heidi Heitkamp of North Dakota and Claire McCaskill of Missouri -- risk damage by association with party leaders who the GOP says are appeasing "illegal immigration" by shutting down the government.

Republicans meanwhile have to consider how long they are prepared to accept the picture of chaos and dysfunction in Washington that is deepening even while they control the House, the Senate and the White House.

Conventional wisdom suggests that the public is likely to punish a party in that situation -- even though the GOP has done an effective job trying to shift blame to Senate Minority Leader Chuck Schumer, D-New York, and the Democrats.

Trump, by doing little so far since Friday to publicly resolve the shutdown, also faces seeing his already compromised image as the only man who could fix Washington further tarnished.

If he throws himself into a big public effort to resolve the issue and to move to a full-on solution of DACA, he could win significant political points -- though he risks alienating advisers like Stephen Miller and grassroots voters in his coalition who take an uncompromising line on immigration issues.

Schumer and Republican Sen. Lindsey Graham of South Carolina have complained that Trump's White House team is obstructing, rather than helping chances of a deal.

Should a big intervention by the President fail however, he could further compromise his "Art of the Deal" mystique at a time when his temperament, knowledge of complicated issues and capacity to govern is in question.