---@meta

---@class MuxMod
---@field all_domains fun(): MuxDomainObj[] Returns an array table holding all of the known MuxDomain objects.
---@field all_windows fun(): MuxWindow[] Returns an array table holding all of the known MuxWindow objects.
---@field get_active_workspace fun(): string Returns the name of the active workspace.
---@field get_domain fun(name_or_id: string | number): string Resolves name_or_id to a domain and returns a MuxDomain object representation of it. `name_or_id` can be: A domain name string to resolve the domain by name, A domain id to resolve the domain by id, nil or omitted to return the current default domain, other lua types will generate a lua error
---@field get_pane fun(id: number): Pane Given a pane ID, verifies that the ID is a valid pane known to the mux and returns a Pane object that can be used to operate on the pane. This is useful for situations where you have obtained a pane id from some other source and want to use the various `Pane` methods with it.
---@field get_tab fun(id: number): MuxTabObj Given a tab ID, verifies that the ID is a valid tab known to the mux and returns a MuxTab object that can be used to operate on the tab. This is useful for situations where you have obtained a tab id from some other source and want to use the various `MuxTab` methods with it.
---@field get_window fun(id: number): MuxWindow Given a window ID, verifies that the ID is a valid window known to the mux and returns a MuxWindow object that can be used to operate on the window. This is useful for situations where you have obtained a window id from some other source and want to use the various `MuxWindow` methods with it.
---@field get_workspace_names fun(): string[] Returns a table containing the names of the workspaces known to the mux.
---@field rename_workspace fun(old: string, new: string): nil Renames the workspace old to new.
---@field set_active_workspace fun(name: string): nil Sets the active workspace name. If the requested name doesn't correspond to an existing workspace, then an error is raised.
---@field set_default_domain fun(domain: MuxDomainObj): nil Assign a new default domain in the mux. The domain that you assign here will override any configured `default_domain` or the implicit assignment of the default domain that may have happened as a result of starting wezterm via `wezterm connect` or `wezterm serial`.
---@field spawn_window fun(...: any): {tab: MuxTabObj, pane: Pane, window: MuxWindow} Spawns a program into a new window, returning the MuxTab, Pane and MuxWindow objects associated with it. When no arguments are passed, the default program is spawned. TODO
