from tkinter import *
from tkinter import ttk
from functions.clean import clean_data
from functions.load import load_data
from functions.filter import filter_ngr
from functions.filter import extract_eid_information
from functions.manipulate import manipulate_values
from functions.statistics import calculate_statistics
from functions.visualise import generate_output_and_visualizations
from functions.convert import save_as_json
from functions.convert import save_as_xml
from functions.backup_restore import backup_to_mongodb
from functions.backup_restore import restore_from_mongodb
from ui.frames import initialize_frames as frame

# Create buttons for each option
load_data_button = ttk.Button(frame, text="Load dataset", command=load_data)
load_data_button.pack(fill='x', pady=5)

clean_data_button = ttk.Button(frame, text="Clean dataset", command=clean_data)
clean_data_button.pack(fill='x', pady=5)

load_and_save_button = ttk.Button(frame, text="Load and save prepared data", command=load_and_save_prepared_data, state='disabled')
load_and_save_button.pack(fill='x', pady=5)

generate_output_button = ttk.Button(frame, text="Generate output and visualizations", command=generate_output_and_visualizations, state='disabled')
generate_output_button.pack(fill='x', pady=5)

manipulate_values_button = ttk.Button(frame, text="Manipulate values", command=manipulate_values, state='disabled')
manipulate_values_button.pack(fill='x', pady=5)

# Create quit button
quit_button = ttk.Button(root, text="Quit", command=root.destroy)
quit_button.grid(row=1, column=0, sticky='s', padx=5, pady=5)
