from dataclasses import dataclass
from PySide6.QtCore import Qt
from PySide6.QtWidgets import QDialog, QMainWindow, QMessageBox, QWidget
from utils_qt_mk._general import Singleton


MessageBoxType: _MessageBoxType = None
_MBCategories: _MessageBoxCategories = None
_StandardButtons: dict[int, QMessageBox.StandardButton] = None
_WindowTypes: dict[int, Qt.WindowType] = None

def get_messagebox_types(fetch_data: bool = False) -> list[str | _MessageBoxData]: ...
def merge_json(path: str) -> None: ...
def message(parent: QWidget, mbd: _MessageBoxData, custom_text: str = None) -> QMessageBox.StandardButton: ...


@dataclass
class _MessageBoxData:
	def __init__(self, icon: QMessageBox.Icon = Icon.NoIcon, title: str = '', text: str = '', buttons: list[QMessageBox.StandardButton] = None, flags: list[Qt.WindowType] = None) -> None: ...
	@classmethod
	def from_dict(cls, src: dict) -> _MessageBoxData: ...
	def merged_bits(self, attr: str) -> QMessageBox.StandardButton | Qt.WindowType: ...
	@property
	def as_dict(self) -> dict: ...


@dataclass
class _MessageBoxCategories(metaclass=Singleton):
	def __init__(self) -> None: ...


class _MessageBoxType(metaclass=Singleton):
	close_event_question: _MessageBoxData = None
	def __init__(self) -> None: ...
	def converted_keys(self) -> list[str]: ...
	def export_types(self) -> None: ...
	def import_types(self) -> None: ...
	def is_empty(self) -> bool: ...


class _OrderedSelectionList(QWidget):
	def __init__(self, list_name: str, items: list, add: str, remove: str) -> None: ...
	def _setup_connections(self) -> None: ...
	def _setup_ui(self) -> None: ...
	def _slot_add_item(self) -> None: ...
	def _slot_remove_item(self) -> None: ...
	def setEnabled(self, new_state: bool) -> None: ...
	def set_selection(self, new_selection: list[str]) -> None: ...
	@property
	def selection_idx(self) -> list[int]: ...
	@property
	def selection_str(self) -> list[str]: ...


class _MessageBoxTypeCreator(QDialog):
	def __init__(self) -> None: ...
	def _get_as_messageboxdata(self) -> _MessageBoxData: ...
	def _setup_connections(self) -> None: ...
	def _setup_ui(self) -> None: ...
	def _slot_delete_settings(self) -> None: ...
	def _slot_export_settings(self) -> None: ...
	def _slot_set_control_states(self) -> None: ...
	def _slot_test_settings(self) -> None: ...
	def _slot_update_by_combobox(self) -> None: ...


class _TestApplication(QMainWindow):
	def __init__(self) -> None: ...
	def _setup_connections(self) -> None: ...
	def _setup_ui(self) -> None: ...
	@classmethod
	def _slot_mbtc_test(cls) -> None: ...
