It isn't clear if there was a plan for last week. Some consequential things went down: The U.S. sanctioned Iran's top diplomat, revved up the trade war with China, and signed off on a spending bill that will spike the national debt. But all that got largely lost by the wayside as the president went to war with a Baltimore icon.

The big picture: Nobody knew it was coming, nobody knew how to handle it, and a week later, senior White House officials have their fingers crossed that the president won't turn their week upside-down once again with another tweet about a "Fox and Friends" segment. As the week has unfurled, people inside and outside the White House described to me how a few pokes of a keyboard by the leader of the free world sent some of Washington's most powerful political players scrambling for cover.

Driving the news: Inside the White House, the conversation about Baltimore last week moved into a brief discussion of policy solutions.

In at least one conversation with senior aides and another discussion with an outside ally, Trump entertained the idea of declaring a state of emergency in Baltimore — an extraordinary action that would potentially open up new federal powers and funding, according to four sources familiar with the conversations.

The idea, one of these sources said, would be to say that the living conditions in Baltimore were unacceptable and that people were suffering because their Democratic representatives let them down. So Trump would take action to fix things.

Trump also discussed declaring a state of emergency in other cities controlled by Democrats, including San Francisco and Detroit, a White House official told me.

Between the lines: The emergency idea appears to have been a brief conversation and no more than that. And by Thursday, White House officials had concluded it was too difficult, logistically, for the president to visit Baltimore next week — another idea they had tossed around. So we're back where we started, a week and a day after Trump's inflammatory tweets.

How it all began: Last Saturday morning, the president of the United States was watching "Fox and Friends." The show aired a segment that claimed Rep. Elijah Cummings was ignoring his district in West Baltimore and that it was full of trash.

The segment opened with footage of Cummings upbraiding the Department of Homeland Security's acting Secretary Kevin McAleenan for the awful conditions migrant children face in detention camps at the border.

"You know to have Congressman Cummings talk about the situation at the border, it's laughable," the Republican strategist guest said, "because the conditions in his own district, and a lot of people said he hasn’t even been there in a while, are atrocious."

Trump parroted the segment, describing Cummings' district as "a disgusting, rat and rodent infested mess." The president went on to imply that Cummings was corrupt.

Behind the scenes: After Trump's tweet, many elected officials rushed to Cummings' defense. CNN anchor Victor Blackwell choked up. "When he tweets about infestation," Blackwell said, "it's about black and brown people."

A few inside the White House were disturbed by the remarks, especially coming so soon after Trump told four female congresswomen of color to "go back" to where they came from, according to sources with direct knowledge.

But many more White House officials and Trump allies supported the attack on Cummings, whose committee is investigating the president and his administration. They saw a political advantage in Trump highlighting urban plight in districts that have long been under Democratic control.

From Monday, White House officials began brainstorming how they could amplify the president's attacks on Cummings. They talked about whether Trump should visit Baltimore. (He didn't.) They discussed whether the only African American in Trump's Cabinet, Housing and Urban Development Secretary Ben Carson, should visit Baltimore. (Carson, a former Baltimore resident, held a press conference there on Wednesday after touring a housing development.)

On Tuesday, Ivanka Trump reminded people that in 2017 she donated proceeds from her book to support an initiative, "incubated in Baltimore," to help female entrepreneurs.

Trump's allies outside the White House sprung into action. Also on Tuesday, former UN Ambassador Nikki Haley, who remains close to Ivanka Trump, tweeted: "Instead of all of this back and forth about who everyone thinks is racist and [who's] not, the President just offered to help the people of Baltimore. They should take him up on it."

Benny Johnson from Turning Point USA, a pro-Trump group that mobilizes young conservatives, toured Cummings' district and reinforced Trump's message in a short video.

Back in the White House, Trump wondered aloud about what he could do to show he could fix the problems in Baltimore and other cities under Democratic control. That’s when he discussed declaring states of emergency in these cities. The idea hasn't gone anywhere yet, according to White House officials.

Officials said that once they thought it through, the idea didn't make much sense. It wouldn't make much sense to funnel more federal money into a district after Trump had described the same district as corrupt, one said. Another official compared Baltimore to Puerto Rico. And a third questioned where it would end. How many emergencies would Trump declare?

These officials told me that as far as they were aware, White House lawyers never got involved in these conversations. Former senior White House lawyers who worked for previous presidents told me they'd never heard of a president declaring an emergency in a city, absent a natural disaster and local leaders' requests for help.

What's next: The Baltimore conversation seems to be waning inside the White House. Certainly, nobody senior who I spoke to thought that any new policy would come out of it.

Then on Friday morning, Trump tweeted: "Really bad news! The Baltimore house of Elijah Cummings was robbed. Too bad!"

This went too far even for some allies, including Nikki Haley.

The bottom line: Baltimore Week illuminates how things often work inside the Trump White House: The president watches TV, he tweets, and the machinery of government scrambles into action to deal with an emergency of the president's own creation. Then everyone moves on.