from __future__ import annotations

from ralium.bundle import FileSystem, BundledHTTPRequestHandler

from ralium.util.helpers import *
from ralium.util import AbsolutePath

from http.server import SimpleHTTPRequestHandler
from _typeshed import StrPath, BytesPath
from pathlib import Path
from typing import overload, AnyStr, Any

def get_type_name(object: Any) -> str: ...
def check_bundled() -> bool: ...
def get_bundled_filesystem() -> FileSystem | None: ...
def get_http_request_handler() -> SimpleHTTPRequestHandler | BundledHTTPRequestHandler: ...

@overload
def check_path_exists(path: Path) -> bool: ...
@overload
def check_path_exists(path: StrPath) -> bool: ...
@overload
def check_path_exists(path: BytesPath) -> bool: ...

@overload
def check_path_is_dir(path: Path) -> bool: ...
@overload
def check_path_is_dir(path: StrPath) -> bool: ...
@overload
def check_path_is_dir(path: BytesPath) -> bool: ...

@overload
def read_file_contents(path: Path, encoding: str = "UTF-8") -> AnyStr: ...
@overload
def read_file_contents(path: StrPath, encoding: str = "UTF-8") -> AnyStr: ...
@overload
def read_file_contents(path: BytesPath, encoding: str = "UTF-8") -> AnyStr: ...

@overload
def create_path(path: Path) -> AbsolutePath: ...
@overload
def create_path(path: StrPath) -> AbsolutePath: ...
@overload
def create_path(path: BytesPath) -> AbsolutePath: ...

@overload
def normalize_system_path(path: Path) -> Path: ...
@overload
def normalize_system_path(path: StrPath) -> Path: ...
@overload
def normalize_system_path(path: BytesPath) -> Path: ...

def normalize_webhook_url(path: str) -> StrPath: ...
def is_function(object: Any) -> bool: ...