The county legislative authority of a county may cause an action to be filed in the superior court of that county for a declaratory judgment finding that a county elected official has abandoned his or her responsibilities by being absent from the county and failing to perform his or her official duties for a period of at least thirty consecutive days, but not including: (1) Absences approved by the county legislative authority; or (2) absences arising from leave taken for legitimate medical or disability purposes. If such a declaratory judgment is issued, the county official is no longer eligible to receive compensation from the date the declaratory judgment is issued until the court issues a subsequent declaratory judgment finding that the county official has commenced performing his or her responsibilities.