President Donald Trump. AP It's a good thing for Democrats that President Donald Trump's executive order on immigration was so haphazardly implemented.

Trump's chaotic and too-broad action inflamed the Democratic base and angered many Republicans in Congress who weren't consulted and didn't know how to defend what the president had done.

But Democrats should not get comfortable about the politics of immigration. Even despite the chaos, Trump's ban is polling at about a 50-50 proposition.

There is a hazard hiding for Democrats here, one that will become more evident as the furor over the order fades. Already, the order has been "clarified" to reduce its outrageousness (particularly through Homeland Security Secretary John Kelly's declaration that legal permanent residents from the seven banned countries can still be admitted).

The political risk to Democrats isn't just about the politics of terrorism or of Islam.

Eventually, Trump will get to more comfortable political ground: the question of whether immigration to the US is in the interest of American citizens. He has a theory of why restrictive policies are good for Americans, one that was the centerpiece of his successful presidential campaign.

Democrats are much less clear about what they see as the purpose of immigration and how they believe their policies would serve the interests of existing American citizens. Often, their arguments for immigration focus on the opportunities it affords to potential immigrants — that is, people who cannot vote.

Democratic arguments around immigration tend lately to be based around outrage at Trump's ideas and actions on the issue. Because Trump is outrageous, there is a lot of mileage to be had in this.

But eventually, Democrats will need to be able to make a case that their preferred immigration policies serve the national interest. They're not yet positioned to do so.

Immigration policy is about allocating a limited resource

Unless you support a policy of totally open immigration — an idea that has adherents among the commentariat but not in significant numbers among voters or elected officials — you endorse the idea that sometimes the government will say no to people who would like to come to the US.

Given the need for limits, you will have to come up with some rules about who gets told no, and why.

One might consider the benefits to those who would immigrate — who stands to gain the most from admission to the US? Another consideration is the benefits to those who are already citizens — who will add the most of value to the American economy or the American culture?

You should also consider the costs imposed by some immigrants — for example, if they might be likely to commit crimes or consume government services that cost more than they will pay in taxes.

Trump has been clear: His view is that immigration policy, like all policy, should be made foremost on the basis of the interests of American citizens. And his executive order is driven by a stated concern that immigrants from certain countries might be especially likely to commit acts of terrorism.

Chuck Schumer. Aaron P. Bernstein/Getty Images

Democrats have good arguments against Trump's policy but not for their own

The arguments against Trump's executive order, and against his broad stereotyping of immigrants ("They're bringing drugs, they're bringing crime") have been easy to make: Trump overstates the criminality of immigrants. No terrorism deaths on American soil are attributable to admittees from the banned countries. Unlike unvetted asylees arriving in Europe, refugees in the US are extensively vetted and small in number relative to the population.

This is all valid enough as a case that Trump is overstating or inventing the downsides of immigration.

But what is the compelling illustration of upsides, to make the case that Americans should permit large amounts of immigration, despite their perception that immigration creates certain problems?

There are broad appeals to the economic and cultural benefits of immigration.

But the economic case is undermined by the arbitrary nature of the way the consensus reform position would admit immigrants: guest-worker programs at both the high and the low ends of the skill spectrum, as well as millions of admissions allocated to existing unauthorized immigrants primarily on the basis of when they arrived in the US rather than their ability to contribute economically.

As for the cultural case, the desirability of "taco trucks on every corner" is a matter of opinion.

Immigration policy really is a matter of globalism versus nationalism

I think the true reason that immigration advocates fail to make strong national-interest arguments for immigration is that the pro-immigration impulse is not really about the national interest.

Potential immigrants are human beings with moral worth. Especially in the case of refugees, they have been disadvantaged by the place of their birth. The human condition is improved by their admission to the US. This — a global, humanistic concern — is a driving factor behind support for immigration.

Plus, elites in government, media, and business tend to be in positions where they stand to derive disproportionate benefits from immigration to the US and bear relatively few costs related to it. Thus immigration is a relatively easy area to favor policy altruism.

But what if about half the electorate disagrees? What's in it for them?

White House Chief Strategist Steve Bannon, right, and President Trump. AP Photo/Evan Vucci

An effective pro-immigration message would synthesize globalism and nationalism

Immigration advocates do not need to abandon the idea that resettling refugees is a morally necessary act of altruism by a rich country, nor do they need to concede the idea that public policy should be made solely in the interest of American citizens, forsaking the concerns of all other people.

But they need to acknowledge that admitting outsiders to the US is a policy choice — and demonstrate that they have carefully considered the national interest in making the choice. Voters will be more inclined to let politicians be altruistic on their behalf if they do not believe their own interests have been lost in the calculations.

So, how many people should we admit to the US based on their need for a new country to live in? For those we admit or naturalize for other reasons, what is the benefit to existing citizens of the US?

In the case of refugees, the main argument is altruism, and perhaps also the improvement of America's image abroad.

In the case of people coming to the US for work, ideally they should provide needed skills and improve the economy. On the other hand, admitted workers might slacken the labor market and drive down wages. They and their families might also consume more in government services than they pay in taxes.

The economic case for immigration would be strengthened by limiting work-based admissions to the higher end of the skill spectrum, and by ensuring that high-skill worker-visa programs are used to find workers of high and unique skill, not to support outsourcing firms that drive down wages.

Raising the minimum income for skilled workers on H1-B visas would be an example of such a policy.

Declining to enforce immigration law has hurt pro-immigration politicians' credibility

Most important, immigration advocates can demonstrate their focus on the national interest by being willing to support enforcement of laws against immigration that is neither legal nor in the national interest — by showing that the willingness to say "yes" to immigration is paired with a willingness to say "no."

For the last 20 years or more, the federal government has pursued a policy of benign neglect. Trump presents this as a problem of "weak borders," but the main issue is a failure of interior enforcement — particularly a failure to aggressively enforce laws against working in the US without authorization.

Members of Congress in both parties have bent to the will of employers who do not want to have to prove their employees are authorized to work. President Barack Obama sought to grant millions of work permits to immigrants living in the country illegally through an executive order that was blocked by federal courts.

Former US Secretary of State Hillary Clinton. Associated Press Hillary Clinton promised to go further, halting all deportations of immigrants living in the country illegally except for violent criminals and terrorists.

In recent years, Democrats have come to talk about deportation in the same wrongheaded way Occupy Wall Street activists talked about foreclosure: as a horrible, heartless thing to do, rather than a sometimes regrettably necessary action in nation of laws.

A lender should not foreclose on every homeowner in default, but you cannot have mortgage lending without the option of foreclosure. Similarly, you do not have an immigration policy if you cannot deport non-citizens for violating immigration law.

This neglect is a major reason for the failure of comprehensive immigration reform.

Immigration reform is supposed to be a trade: amnesty for unauthorized immigrants and high future levels of legal immigration, in exchange for stringent enforcement of immigration laws in the future.

But why would anyone believe that Democrats or pre-Trump Republicans would follow through on a promise to enforce immigration law effectively? Even Trump has not (yet) made workplace enforcement a priority.

Immigration reform is an example of no-choice politics, and Trump's election was part of voters' global revolt against the insistence that they accept policy choices that are foisted upon them through path dependence orchestrated by political elites.

The national interest needs a central place in all policymaking

In a recent cover story for National Review, Rich Lowry and Ramesh Ponnuru made the case that conservatives should embrace "a sensible and moderate form of nationalism." About half their essay is spent trying to settle on the correct definition of "nationalism," which suggests to me that "nationalism" is not a very useful term for what Lowry and Ponnuru are getting at.

But I do think their endorsement of an ideology based on "solidarity with one's countrymen, whose welfare comes before, albeit not to the complete exclusion of, that of foreigners" is not only a good idea, but also a necessary one for conservatives or liberals who expect to win control of a government elected by their countrymen.

You don't need to be a nationalist to understand that voters will expect policies to be made in their interest.

You can even think of this as identity politics, as applied to the whole electorate. How can something be identity politics if it applies to the whole electorate? Well, the whole American electorate has a shared identity characteristic: They are all American citizens.

Yet on immigration, Democrats have somehow ended up with policies premised heavily on their benefits to non-citizens, and therefore with an identity politics aimed at people who aren't eligible to vote.

In other words, they are doing identity politics badly, and will have to do it better — and rethink their ideas to put more of a focus on American citizens' interests — to beat Trump on immigration.