import tkinter.filedialog as filedialog
from tkinter import ttk

from .. import display



def main_gui() -> str|None:
	window = ttk.Frame( display.tkroot, padding=5 )
	window.grid()

	files = [
		( "All Files"                , "*.*"          ),
		( "Portable Network Graphics", "*.png"        ),
		( "Truevision TGA"           , "*.tga"        ),
		( "JPEG Image"               , "*.jpg,*.jpeg" ),
		( "Bitmap"                   , "*.bmp"        )
	]
	path = filedialog.asksaveasfilename(
		title="Choose Screenshot Path", filetypes=files, defaultextension=".png"
	)
	return path
