# Path: eldonationtracker/api/participant.py
# class Participant(donor_drive_participant.Participant):
#     def __init__(self, config):
#     def set_config_values(self) -> None:
#     def output_participant_data(self) -> None:  # pragma: no cover
#     def output_donation_data(self) -> None:
#     def output_donor_data(self) -> None:
#     def output_milestone_data(self) -> None:  # pragma: no cover
#     def output_incentive_data(self) -> None:  # pragma: no cover
#     def write_text_files(self, dictionary: dict) -> None:  # pragma: no cover
#     def run(self) -> None:
# 
# Path: eldonationtracker/ui/call_about.py
# class AboutProgram(QDialog):
#     def __init__(self):
#     def ok_clicked(self):
# def main():
# 
# Path: eldonationtracker/ui/call_settings.py
# LOG_FORMAT = '%(name)s: %(message)s'
# class MyForm(QDialog):
#     def __init__(self, participant_conf, tracker):
#     def reload_config(self):
#     def revert(self):
#     def _elements_to_save(self):
#     def persistent_save(self):
#     def _select_folder(self):
#     def _select_file(self, which_file):
#     def _change_font(self):
#     def _change_font_color(self):
#     def _change_tracker_bg_color(self):
#     def _get_tracker_assets(self, asset):
#     def _validate_id(self, id_type: str):
# def main(participant_conf):
# 
# Path: eldonationtracker/ui/call_tracker.py
# LOG_FORMAT = '%(name)s: %(message)s'
# class MyForm(QDialog):
#     def __init__(self, participant_conf, participant):
#     def _load_image(self):
#     def _load_sound(self):
#     def _load_and_unload_helper(self):
#     def load_and_unload_test(self):
#     def _load_and_unload(self):
#     def _load_elements(self):
#     def _unload_elements(self):
#     def set_font(self, font):
#     def set_font_color(self, font_color):
#     def set_background_color(self, color):
# def main(participant_conf):
# 
# Path: eldonationtracker/ui/main_gui.py
# class Ui_MainWindow(object):
#     def setupUi(self, MainWindow):
#     def retranslateUi(self, MainWindow):
# 
# Path: eldonationtracker/utils/extralife_io.py
# def validate_url(url: str):
# def get_json(url: str, order_by_donations: bool = False, order_by_amount: bool = False) -> dict:
# def get_donations(donations_or_donors: list, api_url: str, is_donation=True, largest_first=False) -> list:
# def get_badges(api_url: str) -> list[Badge]:
#     def __init__(self):
#     def load_json(self) -> dict:  # pragma: no cover
#     def get_github_config(self):  # pragma: no cover
#     def get_tracker_assets(self, asset: str):  # pragma: no cover
#     def update_fields(self):
#     def write_config(self, config: dict, default: bool):  # pragma: no cover
#     def get_version(self):
#     def reload_json(self):
#     def get_cli_values(self) -> Tuple[Any, Any, Any, Any, Any]:
#     def get_text_folder_only(self) -> str:
#     def get_gui_values(self) -> Tuple[Any, Any, Any, Any, Any, Any, Any, Any, Any, Any, Any, Any, Any]:
#     def get_font_info(self):
#     def get_tracker_background_color(self):
#     def get_if_in_team(self) -> bool:
#     def get_version_mismatch(self) -> bool:
#     def get_tracker_image(self) -> str:
#     def get_tracker_sound(self) -> str:
#     def __str__(self):
# def single_format(donor, message: bool, currency_symbol: str) -> str:
# def multiple_format(donors, message: bool, horizontal: bool,
#                     currency_symbol: str, how_many: int) -> str:
# def format_information_for_output(donation_list: list, currency_symbol: str, donors_to_display: str, team: bool,
#                                   donation=True) -> dict:
# def output_badge_data(badge_list: list[Badge], text_folder: str, team=False) -> None:  # pragma: no cover
# def read_in_total_raised(text_folder: str) -> str:
# def write_text_files(dictionary: dict, text_folder: str):
# def write_html_files(data: str, filename: str, text_folder: str):
# class ParticipantConf:


import logging
import sys
import webbrowser
import eldonationtracker.utils.update_available
from PyQt5.QtWidgets import QMainWindow, QApplication, QMessageBox, QInputDialog
from PyQt5 import QtCore
from rich import print
from rich.logging import RichHandler
from eldonationtracker.api import participant as participant
from eldonationtracker.ui import call_about as call_about, call_settings as call_settings, call_tracker as call_tracker, \
    main_gui as design
from eldonationtracker.utils import extralife_io as extralife_io
"""The main GUI window."""






# logging
LOG_FORMAT = '%(name)s: %(message)s'
logging.basicConfig(level=logging.INFO, format=LOG_FORMAT, handlers=[RichHandler(markup=True, show_path=False)])
GUI_log = logging.getLogger("main GUI")


class ELDonationGUI(QMainWindow, design.Ui_MainWindow):
    """The main ui Window."""

    def __init__(self):
        """Setup the GUI.

        Set up QTimers:
         1) to allow the text on the GUI to update without blocking the user from interacting with the GUI.
         2) to run the participant.py updates

        Then we instantiate the other windows:
        tracker and settings

        Finally, connect the buttons.
        """
        super(self.__class__, self).__init__()


# Path: eldonationtracker/api/participant.py
# class Participant(donor_drive_participant.Participant):
#     def __init__(self, config):
#     def set_config_values(self) -> None:
#     def output_participant_data(self) -> None:  # pragma: no cover
#     def output_donation_data(self) -> None:
#     def output_donor_data(self) -> None:
#     def output_milestone_data(self) -> None:  # pragma: no cover
#     def output_incentive_data(self) -> None:  # pragma: no cover
#     def write_text_files(self, dictionary: dict) -> None:  # pragma: no cover
#     def run(self) -> None:
# 
# Path: eldonationtracker/ui/call_about.py
# class AboutProgram(QDialog):
#     def __init__(self):
#     def ok_clicked(self):
# def main():
# 
# Path: eldonationtracker/ui/call_settings.py
# LOG_FORMAT = '%(name)s: %(message)s'
# class MyForm(QDialog):
#     def __init__(self, participant_conf, tracker):
#     def reload_config(self):
#     def revert(self):
#     def _elements_to_save(self):
#     def persistent_save(self):
#     def _select_folder(self):
#     def _select_file(self, which_file):
#     def _change_font(self):
#     def _change_font_color(self):
#     def _change_tracker_bg_color(self):
#     def _get_tracker_assets(self, asset):
#     def _validate_id(self, id_type: str):
# def main(participant_conf):
# 
# Path: eldonationtracker/ui/call_tracker.py
# LOG_FORMAT = '%(name)s: %(message)s'
# class MyForm(QDialog):
#     def __init__(self, participant_conf, participant):
#     def _load_image(self):
#     def _load_sound(self):
#     def _load_and_unload_helper(self):
#     def load_and_unload_test(self):
#     def _load_and_unload(self):
#     def _load_elements(self):
#     def _unload_elements(self):
#     def set_font(self, font):
#     def set_font_color(self, font_color):
#     def set_background_color(self, color):
# def main(participant_conf):
# 
# Path: eldonationtracker/ui/main_gui.py
# class Ui_MainWindow(object):
#     def setupUi(self, MainWindow):
#     def retranslateUi(self, MainWindow):
# 
# Path: eldonationtracker/utils/extralife_io.py
# def validate_url(url: str):
# def get_json(url: str, order_by_donations: bool = False, order_by_amount: bool = False) -> dict:
# def get_donations(donations_or_donors: list, api_url: str, is_donation=True, largest_first=False) -> list:
# def get_badges(api_url: str) -> list[Badge]:
#     def __init__(self):
#     def load_json(self) -> dict:  # pragma: no cover
#     def get_github_config(self):  # pragma: no cover
#     def get_tracker_assets(self, asset: str):  # pragma: no cover
#     def update_fields(self):
#     def write_config(self, config: dict, default: bool):  # pragma: no cover
#     def get_version(self):
#     def reload_json(self):
#     def get_cli_values(self) -> Tuple[Any, Any, Any, Any, Any]:
#     def get_text_folder_only(self) -> str:
#     def get_gui_values(self) -> Tuple[Any, Any, Any, Any, Any, Any, Any, Any, Any, Any, Any, Any, Any]:
#     def get_font_info(self):
#     def get_tracker_background_color(self):
#     def get_if_in_team(self) -> bool:
#     def get_version_mismatch(self) -> bool:
#     def get_tracker_image(self) -> str:
#     def get_tracker_sound(self) -> str:
#     def __str__(self):
# def single_format(donor, message: bool, currency_symbol: str) -> str:
# def multiple_format(donors, message: bool, horizontal: bool,
#                     currency_symbol: str, how_many: int) -> str:
# def format_information_for_output(donation_list: list, currency_symbol: str, donors_to_display: str, team: bool,
#                                   donation=True) -> dict:
# def output_badge_data(badge_list: list[Badge], text_folder: str, team=False) -> None:  # pragma: no cover
# def read_in_total_raised(text_folder: str) -> str:
# def write_text_files(dictionary: dict, text_folder: str):
# def write_html_files(data: str, filename: str, text_folder: str):
# class ParticipantConf:


# Path: eldonationtracker/ui/call_main_gui.py
import logging
import sys
import webbrowser
import eldonationtracker.utils.update_available
from PyQt5.QtWidgets import QMainWindow, QApplication, QMessageBox, QInputDialog
from PyQt5 import QtCore
from rich import print
from rich.logging import RichHandler
from eldonationtracker.api import participant as participant
from eldonationtracker.ui import call_about as call_about, call_settings as call_settings, call_tracker as call_tracker, \
    main_gui as design
from eldonationtracker.utils import extralife_io as extralife_io

"""The main GUI window."""






# logging
LOG_FORMAT = '%(name)s: %(message)s'
logging.basicConfig(level=logging.INFO, format=LOG_FORMAT, handlers=[RichHandler(markup=True, show_path=False)])
GUI_log = logging.getLogger("main GUI")


class ELDonationGUI(QMainWindow, design.Ui_MainWindow):
    """The main ui Window."""

    def __init__(self):
        """Setup the GUI.

        Set up QTimers:
         1) to allow the text on the GUI to update without blocking the user from interacting with the GUI.
         2) to run the participant.py updates

        Then we instantiate the other windows:
        tracker and settings

        Finally, connect the buttons.
        """
        super(self.__class__, self).__init__()


        self.participant_conf = extralife_io.ParticipantConf()