In plaintiff's successful suit against a hospital to have his hospital privileges reinstated, trial court's denial of his motion for attorney fees is reversed and remanded where: 1) when the conditions contained in section 809.9 are shown, the prevailing party is entitled to attorney fees; 2) the statutory phrase "frivolous, unreasonable, without foundation, or in bad faith," set forth separate grounds for an award of attorney fees; 3) the terms "frivolous," "unreasonable" and "without foundation" are objective standards that might overlap; 4) the term "bad faith" is a subjective standard concerned with a defendant's motives for defending or litigating a lawsuit; and 5) because a defendant's subjective state of mind is usually proven by circumstantial evidence, a defendant's prelitigaton conduct and postlitigation conduct are relevant evidence from which inferences can be drawn regarding its motives in defending or litigating a lawsuit.