Desperate Housewives alumna Eva Longoria has closed a deal to play the lead in Type-A, Fox’s single-camera workplace comedy pilot from the Life in Pieces duo of executive producer Jason Winer and writer-producer Lesley Wake-Webster.

Written by Wake-Webster and loosely based on the book Assholes: A Theory by Aaron James, Type-A — in the vein of Up in the Air — is an office comedy about a group of consultants hand-picked to do the dirty work most professionals can’t handle: layoffs, downsizing, generally delivering horrible news. To everyone else, they’re the enemy – to one another, they’re family.

Longoria will play Axler, the ambitious, brutally honest consultant who is at war with her inner “nice girl.”

Winer is directing as well as executive producing with Wake-Webster, while James serves as consultant for 20th Century Fox TV.

Fox and 20th TV have been high on Longoria, courting her for multiple projects. She also is set for a high-profile guest-starring turn this spring on the Fox/20th TV flagship drama series Empire, playing Charlotte Frost, the formidable director of the Nevada Gaming Commission who has the power to make or break Lucious’ (Terrence Howard) dreams of expanding Empire’s reach to Las Vegas.

Via her production company UnbeliEVAble Entertainment, Longoria executive produced the Lifetime series Devious Maids and NBC comedy Telenovela, in which she also starred. Longoria next stars opposite Demian Bichir in the feature Lowriders and is featured in the British miniseries Decline and Fall opposite Jack Whitehall, which premieres in the spring. She recently directed an episode of the CW’s Jane the Virgin and is set to direct an episode of ABC’s Black-ish.

Longoria is repped by CAA and Brillstein Entertainment Partners with Richard Marks of The Point Media as legal counsel.