
82 So.3d 1077 (2012)
Robert ALORDA and Danielle Alorda-McKinnon, Appellants,
v.
SUTTON PLACE HOMEOWNERS ASSOCIATION, INC., Appellee.
No. 2D10-3966.
District Court of Appeal of Florida, Second District.
January 6, 2012.
Rehearing Denied February 15, 2012.
*1078 Michael V. Laurato of Austin & Laurato, P.A., Tampa, for Appellants.
Francis E. Friscia and George D. Root, III, of Meirose & Friscia, P.A., Tampa, for Appellee.
DAVIS, Judge.
Robert Alorda and his daughter, Danielle Alorda-McKinnon (the Alordas), challenge the trial court's final judgment awarding attorney's fees and costs to Sutton Place Homeowners Association, Inc., in conjunction with the Association's action for injunctive relief against the Alordas. In its order, the trial court found that the Association had prevailed in that action and thus awarded it attorney's fees. However, because the Association could not be the prevailing party in an action seeking an equitable remedy when a remedy at law was available, we reverse.
The Alordas purchased a townhouse located in the Sutton Place subdivision on June 29, 2007.[1] The subdivision is subject to the Declarations of Covenants, Conditions, Restrictions, and Easements filed in the public records of Hillsborough County. Section 9.04 of the Declarations requires that the owner of a residence in the subdivision maintain insurance on the residential property and annually provide notice of such coverage to the Association. Specifically, the provision states that at the time of purchase the owner must provide proof of such coverage and that on the purchase anniversary date each year, the owner must provide proof that such coverage has been renewed.
In June 2008, upon the first anniversary of the Alordas' purchase, the Association did not receive any notice that the Alordas had renewed their insurance coverage. The Association therefore began to send them letters advising of the need to provide the required proof. The record indicates that letters were sent in May, July, and August of 2008. In September 2008, the Association sent its offer to engage in *1079 presuit mediation regarding the coverage issue. Although Mr. Alorda did agree at that time to provide the proof of coverage, he continued to fail to do so. This prompted a letter from the Association requesting his compliance with the prior agreement. When that did not resolve the matter, the Association tried one last time to obtain the proof of coverage by letter dated March 9, 2009.
When these efforts failed, the Association filed its complaint against the Alordas on April 9, 2009. By the complaint, the Association sought the equitable remedy of injunctive relief, specifically asking the trial court to "enter a permanent mandatory injunction requiring that the Defendant obtain the insurance coverages as are described in § 9.04 of the Declaration." In response to the service of that suit, the Alordas' attorney sent the Association's attorney an email on May 6, 2009, advising that the Alordas did have the required coverage. Attached to the email was a copy of the declaration pages of the Alordas' insurance policy, showing that it went into effect March 19, 2009. Counsel for the Alordas also asked if the Association would dismiss its action "so that additional attorney time will not be expended on an appropriate response."
After the Alordas did not receive a favorable response to their attorney's email suggestion, they filed a motion to dismiss on May 11, 2009. In the motion, the Alordas suggested that the Association had failed to plead sufficient facts to establish the needed elements for the trial court to enter an injunction. Specifically, the Alordas argued that although a clear legal right had been violated, the Association had failed to sufficiently establish that it lacked an adequate remedy at law to justify injunctive relief.
In the memorandum of law attached to the motion, the Alordas maintained that the Association's adequate legal remedy was expressed by the terms of the Declarations attached to the Association's complaint. The memorandum quoted section 9.04 of the Declarations as follows:
The owner shall furnish proof of such insurance to the Association at the time of purchase of a lot and shall furnish proof of renewal of such insurance on each anniversary date thereof. If the owner fails to provide such insurance the Association may obtain such insurance and shall assess the owner for the cost of the same in accordance with the provisions of this Declaration.

(Emphasis added.)
Additionally, the Alordas argued that the Association could only obtain injunctive relief to prevent a threatened harm but not to redress harm that already had occurred. The Alordas maintained that because they had obtained insurance coverage effective March 19, 2009, i.e., prior to the filing of the complaint, there remained no threatened harm to be enjoined. And the Alordas further alleged that the issue was moot.
The trial court held a hearing on the motion to dismiss on September 9, 2009, and entered its order denying the motion on September 11, 2009.[2] The Alordas then filed their answer and affirmative defenses on September 24, 2009. Included in the affirmative defenses were the previously raised arguments that the Association had an adequate remedy at law and that injunctive relief was not proper when there was no threatened harm to enjoin where the Alordas already had obtained insurance coverage.
The trial court, however, granted the Association's request that the issue be referred to mediation, which ultimately resulted *1080 in an impasse. On November 16, 2009, the Association filed its notice requesting a nonjury trial, and the trial court, on December 16, 2009, entered its order setting nonjury trial for March 5, 2010. Prior to trial, the Alordas filed a motion for summary judgment, arguing again that as a matter of law the Association was not entitled to injunctive relief. In response to that motion, the Association filed the affidavit of Ronald Trowbridge, agent of the Association, who averred that the Alordas failed to provide the required notice of insurance coverage until after the complaint had been filed.
After considering the motion, the filed depositions, and Mr. Trowbridge's affidavit, the trial judge sent a memo to the parties dated March 2, 2010. He advised that he was going to deny the motion for summary judgment but that he was dismissing the complaint as moot and that the March 5 trial date would be used to determine the prevailing party for the purpose of awarding attorney's fees.
Following that hearing, the trial court entered its order determining that the Association was the prevailing party and awarding it $10,725 in attorney's fees and $2106.40 in costs. The court based its conclusion on the finding that even though the Alordas eventually provided notice of their insurance coverage, the Association had been required to file the lawsuit to obtain that notice.
The Alordas argue on appeal that because injunctive relief was never available to the Association and the complaint should have been resolved on the original motion to dismiss, the Association cannot be considered the prevailing party.
We agree with the Alordas that the Association cannot be considered the prevailing party because it did not state a cause of action for injunctive relief in its complaint. See Shaw v. Tampa Elec. Co., 949 So.2d 1066, 1069 (Fla. 2d DCA 2007) ("`A mandatory injunction is proper where a clear legal right has been violated, irreparable harm has been threatened, and there is a lack of an adequate remedy of law.'" (quoting Dep't of Health & Rehab. Servs. v. Weinstein, 447 So.2d 345, 345 (Fla. 4th DCA 1984))); see also Digaeteno v. Perotti, 374 So.2d 1015, 1016 (Fla. 3d DCA 1979) (concluding that "the trial judge erred in resorting to equity and entering the mandatory injunctions" where the plaintiff had "an adequate remedy at law").
By its own pleadings, the Association acknowledged that it had an available remedy at law. The Declaration attached to the complaint provided the Association with procedures to follow if an owner failed to provide the required notice of insurance coverage. The procedures specifically include allowing the Association to obtain coverage and then assessing the cost of obtaining that coverage against the owner. The procedures also provide that the assessment can be recorded as a lien against the owner's real property if the assessment is not paid within thirty days and that an action at law could then be filed against the owner to collect the assessment, including a foreclosure action on the real estate if necessary. Although the complaint makes a general allegation that the Association did not have an adequate remedy at law, the complaint failed to allege facts that would show how the specific legal remedies provided by the Declaration attached thereto were not available. See Coriat v. Global Assurance Grp., Inc., 862 So.2d 743, 743 (Fla. 3d DCA 2003) ("A trial court[,] when considering a motion to dismiss[,] must look only to the four corners of the complaint including the attachments....").
Accordingly, the trial court should have dismissed the complaint at the September 5, 2009, hearing because the Association failed to allege a cause of action. See City of Coral Springs v. Fla. Nat'l Props., Inc., *1081 340 So.2d 1271, 1272 (Fla. 4th DCA 1976) ("[T]he ... complaint did not state a cause of action for injunctive relief, and ... the appellant's motion to dismiss should have been granted. ... [T]he [complainant] must show that he has no adequate remedy at law."). If the proper ruling had been entered on the Alordas' motion to dismiss, the Association would have been precluded from being the prevailing party because it had failed to state a valid cause upon which it could prevail. Cf. McKelvey v. Kismet, Inc., 430 So.2d 919, 922 (Fla. 3d DCA 1983) (concluding that a defendant is entitled to prevailing party attorney's fees where all of the counts in the plaintiff's complaint were either voluntarily dismissed or dismissed for the plaintiff's failure to state a cause of action); see also Valcarcel v. Chase Bank USA NA, 54 So.3d 989, 991 (Fla. 4th DCA 2010) ("Although the dismissal order was not an adjudication on the merits, the [defendants] can nonetheless be considered the prevailing party. They are entitled to an award of attorney's fees because the action against them was dismissed.").
In reaching this conclusion, we are not unsympathetic to the Association's having incurred unnecessary fees and costs in attempting to obtain the Alordas' compliance with the terms of the Declaration. However, this opinion addresses only whether courts can award fees based on a prevailing party theory where that party can never prevail because the complaint, on its face, fails to state a cause of action. Because this impossibility prevents the award of fees to the Association in this action, we are compelled to reverse that award.
Reversed.
VILLANTI and MORRIS, JJ., Concur.
NOTES
[1]  Although Danielle is on the title to the real estate with her father, she does not reside at the residence.
[2]  Our record does not include a transcript of the September 9, 2009, hearing.
