This is an appeal from a decision of the district court denying Ralph Naylor Farms’ (Naylor Farms) motion for an award of attorney fees and costs pursuant to Idaho Code section 12-117 and Idaho Rule of Civil Procedure 54(d). Because the County did not act without a reasonable basis in fact or law in adopting an ordinance creating an overlay zone, we affirm the district court’s denial of attorney fees and costs.
*808I.
FACTUAL AND PROCEDURAL BACKGROUND
Naylor Farms filed an application with the Idaho Department of Water Resources (IDWR) on June 26, 2002, requesting a groundwater right for both irrigated agriculture and an industrial use for clay processing. Latah County (the County) filed a petition to intervene, which IDWR granted. Following a hearing at which the County appeared and gave testimony in opposition to Naylor Farms’ application, IDWR entered a preliminary order approving the application on December 1, 2004. The County filed a petition for reconsideration of the preliminary order, which was granted and a new hearing was set. While that was pending, an entity, known as Protect Our Water Inc. (POW), also filed a petition and request for hearing in the matter, which was denied by IDWR.
In January of 2005, POW presented the County with a petition requesting that the County impose a moratorium prohibiting the acceptance, review or approval of all conditional use permits or zoning permits related to mineral resource extraction within Latah County. The Latah County Board of Commissioners (Commissioners) requested input from the Latah County Planning Commission, and the Planning Commission concluded that existing zoning ordinances were adequate to address the concerns of POW. Nevertheless, on March 2, 2005, on an emergency basis, the Commissioners enacted Ordinance No. 258 (the Ordinance), creating the “Moscow Sub-basin Groundwater Management Overlay Zone” within a portion of Latah County. The Ordinance prohibited certain activities within the overlay zone, including natural resource mineral extraction and processing.
On June 27, 2005, Naylor Farms attempted to file an application with the Latah County Planning and Building Department for a conditional use permit in order to conduct mineral extraction on its property. The Director of the Planning and Building Department rejected the application, finding that the Ordinance prohibited consideration of the application. Naylor Farms resubmitted the application on June 28, 2005, and sent a letter to both the Director and the Commissioners requesting an appeal to the extent the conditional use permit application had been summarily denied. The Director responded by letter, informing Naylor Farms that the Department was unable to accept applications for uses that are prohibited within the applicable zone.
Naylor Farms filed a complaint in district court seeking invalidation of the Ordinance, as well as just compensation for an alleged regulatory taking. Both Naylor Farms and the County filed motions for summary judgment. After a hearing, the district court granted Naylor Farms’ motion, invalidating the Ordinance, and denied the County’s motion. Naylor Farms then filed a motion for award of attorney fees and costs, together with a supporting memorandum pursuant to I.R.C.P. 54(d). After another hearing, the court rendered its decision, denying Naylor Farms’ motion on the basis that the court could not conclude the county acted without a reasonable basis in fact or law when it enacted the Ordinance. Naylor Farms filed this timely appeal.
II.
STANDARD OF REVIEW
The appellate court exercises free review over the decision of a district court applying I.C. § 12-117. Fischer v. City of Ketchum, 141 Idaho 349, 356, 109 P.3d 1091, 1098 (2005); Homestead Farms, Inc. v. Bd. Of Comm’ers, 141 Idaho 855, 859, 119 P.3d 630, 634 (2005). An award of attorney fees under I.C. § 12-117 has been distilled into a two-part test: fees must be awarded if (1) the Court finds in favor of the person, and (2) the agency acted without a reasonable basis in fact or law. Reardon v. Magic Valley Sand and Gravel, 140 Idaho 115, 118, 90 P.3d 340, 343 (2004).
III.
ANALYSIS
A. Attorney fees under Idaho Code § 12-117
Naylor Farms appeals the district court’s decision denying its request for attorney fees *809pursuant to I.C. § 12-117, arguing that the County acted unreasonably and without authority when it enacted the Ordinance. Idaho Code § 12-117 provides:
Unless otherwise provided by statute, in any administrative or civil judicial proceeding involving as adverse parties a state agency, a city, a county or other taxing district and a person, the court shall award the prevailing party reasonable attorney’s fees, witness fees and reasonable expenses, if the court finds that the party against whom the judgment is rendered acted without a reasonable basis in fact or law.
Idaho Code § 12-117 is not discretionary, but rather, provides that a court must award attorney fees if the court finds in favor of the person, and the state agency did not act with a reasonable basis in fact or law. Fischer, 141 Idaho at 356, 109 P.3d at 1098. Where an agency acts without authority, it is acting without a reasonable basis in fact or law. Id.; Magic Valley Sand & Gravel, 140 Idaho at 120, 90 P.3d at 345. However, if an agency’s actions are based upon a “reasonable, but erroneous interpretation of an ambiguous statute,” then attorney fees should not be awarded. Russet Valley Produce, Inc. Idaho Potato Comrn’n v. Russet Valley Produce, Inc., 127 Idaho 654, 661, 904 P.2d 566, 573 (1995) citing Cox v. Dep’t. of Ins., State of Idaho, 121 Idaho 143, 148, 823 P.2d 177, 182 (Ct.App.1991). Idaho Code § 12-117 serves dual purposes: “(1) to serve as a deterrent to groundless or arbitrary agency action; and (2) to provide a remedy for persons who have borne an unfair and unjustified financial burden attempting to correct mistakes agencies should never have made.” Rincover v. State of Idaho, Dep’t. of Finance, 132 Idaho 547, 549, 976 P.2d 473 (1999).
Typically, in analyzing an award of fees under I.C. § 12-117, this Court has looked to determine whether there was no authority at all for the agency’s actions or whether, on the other hand, the law was not clear or unsettled as to whether the agency had the ability to act. In University of Utah Hosp. v. Ada County Bd. Of Com’rs., 143 Idaho 808, 153 P.3d 1154 (2007), this Court awarded attorney fees against the County when there were clear statutory procedures which the County had failed to follow in denying an application for medical indigency. There were no facts indicating a good faith attempt to interpret the applicable statutes or reasonable confusion about the County’s duties. In Fischer v. City of Ketchum, 141 Idaho 349, 109 P.3d 1091 (2005), the Court awarded attorney fees against the City of Ketchum because it had granted a conditional use permit without requiring certification from a licensed engineer. The Ketchum Zoning Code specifically required such certification before a conditional use permit could issue and this Court found that the City had “ignored the plain language of the ordinance that a certification ... is required before granting a CUP.” 141 Idaho at 356, 109 P.3d at 1098.
On the other hand, in Magic Valley Sand and Gravel, supra, the Court did not award attorney fees against the City of Burley, even though we found the City acted in violation of the constitutional limits on its power and in violation of the LLUPA by adopting a zoning ordinance affecting an impact area lying outside the City’s limits. The Court noted there was case precedent dating “as far back as 1949 that a city’s exercise of jurisdiction in an impact area lying beyond a city’s limits is inconsistent with the constitutional limitations placed on a city’s powers by Article XII, § 2 of the Idaho Constitution.” 140 Idaho at 120, 90 P.3d at 345. Nevertheless, because the City was making a reasonable attempt to interpret the LLUPA, no fees were awarded.
In Karel v. Department of Finance, 144 Idaho 379, 162 P.3d 758 (2007), this Court declined to award fees even though we determined the Department had no authority to request documents from a securities agent when there was no statutory obligation to maintain the requested documents. There were statutory recordkeeping provisions, but the Department admitted it was not requesting any of those documents from the securities agent. However, because this was a matter of first impression in determining how the recordkeeping requirements should be applied, we denied an award of fees under I.C. § 12-117.
*810The question presented by this appeal is whether the County acted without authority in the face of clear provisions and thus, without a reasonable basis in fact or law when it enacted the Ordinance; or alternatively, whether the County’s actions were based upon a reasonable interpretation of an ambiguous or unclear law. Naylor Farms argues there was no ambiguity in the law and the County did not act fairly or reasonably in enacting an ordinance which limited Naylor Farms’ use of a water right decreed by IDWR. Naylor Farms points out that the district court invalidated the Ordinance and the County has not appealed that decision. The County argues that attorney fees should not be awarded because there is little, if any, legal authority addressing the relationship between the Local Land Use. Planning Act (LLUPA), which directs counties to consider water quantity and quality, and other provisions of Idaho law putting the State in charge of water permits.
While the issue presented by this appeal relates only to the decision denying an award of attorney fees, it necessarily involves some consideration of the underlying issue presented to the district court: the validity of the Ordinance. The district court concluded that the enactment of the Ordinance was not arbitrary, as it bore a reasonable relation to the advancement of its stated purpose and it was based on a consideration of the evidence. Nevertheless, the trial court determined that the ordinance was invalid because of an implicit conflict with state law.1 Naylor Farms asserted, and the district court agreed, that the Ordinance implicitly conflicted with state statutes regulating water appropriation and quality. Idaho Code § 42-101 provides in pertinent part: ‘Water being essential to the industrial prosperity of the state, ... its control shall be in the state____ All the waters of the state ... are declared to be the property of the state, whose duty it shall be to supervise their appropriation and allotment____” The district court concluded that the effect of the Ordinance was to control access to water within the Groundwater Management Overlay Zone by controlling certain uses within that zone and therefore, there was an implicit conflict between the Ordinance and the general laws of the State.
Although Naylor Farms was the prevailing party below, the district court declined to award fees because the conflict between the Ordinance and state law “was by no means obvious.” In explanation, the court noted that Latah County was empowered through the LLUPA to consider the effects of land use regulations on water. Although the court concluded that the Ordinance went beyond considering the effects on water and, in effect, was an attempt to manage water in Idaho, the court also concluded that the County’s interpretation of its duties under LLUPA was not unreasonable.
In considering whether Naylor Farms is entitled to an award of attorney fees, we must determine whether the County was faced with an ambiguous or 'unclear statute that would excuse a reasonable but erroneous interpretation, in the absence of applicable case law. While I.C. § 42-101 provides that control over the appropriation of water is vested in the State, there are also Idaho Code provisions which mandate that a local governing board consider the effect any proposed amendments to the comprehensive plan “would have on the source, quantity and quality of ground water in the area.” I.C. § 67-6537. Idaho Code § 39-126, likewise, instructs any agency issuing a license which deals with the environment that it “shall take into account the effect the permitted or licensed activity will have on the ground water quality of the state____”
In creating the Sub-basin Groundwater Management Overlay Zone, the Ordinance contains a number of opening clauses which reflect the County’s recognition of its duties under the LLUPA and under the Groundwater Management Plan adopted by the Pa-louse Basin Advisory Committee, specifically a need to “regulate developments which *811could jeopardize water quality and water quantity.” The Ordinance then creates the parameters for the Overlay Zone and states in Section 2:
Certain Land Uses Prohibited
Within the Zone, the following land use activities shall be prohibited:
• Natural resource mineral extraction and processing
• Confined animal feedlot operations exceeding 200 animal units as defined by Idaho Code Section 67-6529C
• Golf courses
While we respect the district court’s analysis of the Ordinance and preemption by State law, it appears that the major thrust of this Ordinance is to regulate land use, a power clearly reserved to the local governing boards in the LLUPA. It further appears the County made this land use decision by considering, in part, the effects of these types of activities on water quality and quantity in the County.
In making its argument that the County was acting without any reasonable basis in fact or law, Naylor Farms points to several statements or actions taken by the Commissioners, which reflect a less than deliberative approach in adopting the Ordinance. Prior to enacting the Ordinance, Paul Kimmell, a Commissioner, testified that while the Commissioners had control over land use planning and management, “ultimately the State has the right to issue water rights.” Further, in email correspondence with Bruce Livingston, a member of the Moscow Civic Association, Kimmell acknowledges: “I anticipate the State (through IDWR) may challenge our proposed ordinance as a preemptive move by a local jurisdiction to manage the State’s water.” Despite that, Kimmell later acknowledges: “I’m a risk taker and I want to help in deciding what Latah County should look like — not leaving it to someone in Boise. Should be fun.” Furthermore, the County did not wait for legal advice. When contacted by the Commissioners about the legality of the Ordinance, the County’s attorney asked for some time to give them a legal opinion. In spite of that request, the Commissioners proceeded to adopt the Ordinance without waiting for any guidance from their attorney. One of the Commissioners suggested they could “un-adopt it” if their attorney advised them that it was illegal: “... if something happens ... it can be changed, too, or we could un-adopt it.” While the Commissioners may have been motivated by desires to limit mining in Latah County and could have been more circumspect, nevertheless, the County acted to adopt an ordinance which regulated land use, which is something the County has the authority to do.
We also note in its ruling on the underlying issue, the district court found that “in general, the purposes set forth in Ordinance 258 are legitimate bases for regulation.” The district court also found “that there is a basis for a reasonable difference of opinion regarding the necessity of Ordinance 258” and “the Court cannot conclude that the Board of Commissioners acted in an arbitrary manner.” Although this Court reviews the determination of whether to award attorney fees pursuant to I.C. § 12-117 de novo, the question of whether the County was acting unreasonably in adopting the Ordinance is related to whether an award of attorney fees is appropriate. Even though the district court ruled against the County and set aside the Ordinance, it did so on the basis that the County’s actions were preempted by State law and not because the County acted wrongfully or without any authority.
Because there was a legitimate question about the validity of the County’s actions in adopting the Ordinance, the County did not act without a reasonable basis in fact or law and, therefore, we affirm the district court’s decision denying an award of attorney fees under I.C. § 12-117.
B. Costs as a matter of right
Naylor Farms argues that pursuant to I.R.C.P. 54(d), it should have been awarded certain costs as a matter of right, because the district court concluded that it was the prevailing party. I.R.C.P. 54(d)(1)(A) provides: “Except when otherwise limited by these rules, costs shall be allowed as a matter of right to the prevailing party or parties, unless otherwise ordered by *812the court.” An award of costs under I.R.C.P. 54(d)(1), as the rule itself provides, is committed to the sound discretion of the trial court. Zimmerman v. Volkswagen of America, Inc., 128 Idaho 851, 857, 920 P.2d 67, 73(1996) (citations omitted). The district court denied costs for the reasons set forth in its written decision denying attorney fees. On appeal, Naylor Farms did not present any argument that the district court abused its discretion and simply argued it should be awarded its costs. In the absence of some argument indicating an abuse of discretion, we affirm the district court.
C. Attorney fees on appeal
Naylor Farms and the County both seek attorney fees and costs on appeal. The two-part test of I.C. § 12-117 applies on appeal. Magic Valley Sand and Gravel, 140 Idaho at 120, 90 P.3d at 346. Because we have concluded the district court did not err in finding the County did not act without a reasonable basis in fact or law, Naylor Farms is not the prevailing party and we do not award attorney fees to it. Likewise, while the County prevailed on appeal, there was nothing unreasonable about Naylor Farms’ challenge to the district court’s decision. We, therefore, deny an award of attorney fees to either party on appeal.
IV.
CONCLUSION
Because the County did not act without a reasonable basis in fact or law in adopting Ordinance No. 258, we affirm the district court’s decision denying an award of attorney fees under I.C. § 12-117. We award costs on appeal to the County.
Chief Justice EISMANN, Justices BURDICK and W. JONES concur.. Idaho has adopted the doctrine of implied preemption, which provides: "Where it can be inferred from a state statute that the state has intended to fully occupy or preempt a particular area, ... a [local] ordinance in that area will be held to be in conflict with a state law, even if the state law does not so specifically state.” Envirosafe Services of Idaho, Inc. v. County of Owyhee, 112 Idaho 687, 689, 735 P.2d 998, 1000 (1987).