/** * @file * * Mock of Obsidian's `WorkspaceMobileDrawer`, the collapsible side drawer of the mobile app. */ import type { WorkspaceMobileDrawer as WorkspaceMobileDrawerOriginal } from 'obsidian'; import { WorkspaceParent } from './WorkspaceParent.cjs'; /** * Mock of Obsidian's `WorkspaceMobileDrawer`. Nothing slides on screen: expanding and collapsing only update * {@link WorkspaceMobileDrawer.collapsed}. */ export declare class WorkspaceMobileDrawer extends WorkspaceParent { /** * Whether the drawer may keep a single child; always `true`, as in Obsidian. */ allowSingleChild: boolean; /** * Whether the drawer is collapsed. Starts `false` in the mock. */ collapsed: boolean; /** * The item kind, `mobile-drawer`, as Obsidian names it. */ type: string; /** * Creates a drawer. Obsidian does not construct it publicly; use {@link WorkspaceMobileDrawer.create2__}. */ protected constructor(); /** * Mock-only factory: creates a drawer, spyable via `vi.spyOn(WorkspaceMobileDrawer, 'create2__')`. The numbered * subclass variant of `create__`. * * @returns The new drawer. */ static create2__(): WorkspaceMobileDrawer; /** * Mock-only: views a value typed as Obsidian's `WorkspaceMobileDrawer` as this mock. The numbered subclass * variant of `fromOriginalType__`. * * @param value - The value typed as the original `WorkspaceMobileDrawer`. * @returns The same object, typed as the mock. */ static fromOriginalType4__(value: WorkspaceMobileDrawerOriginal): WorkspaceMobileDrawer; /** * Mock-only: views this mock as Obsidian's `WorkspaceMobileDrawer` type. The numbered subclass variant of * `asOriginalType__`. * * @returns The same object, typed as the original `WorkspaceMobileDrawer`. */ asOriginalType4__(): WorkspaceMobileDrawerOriginal; /** * Collapses the drawer. The mock sets {@link WorkspaceMobileDrawer.collapsed} to `true`. */ collapse(): void; /** * Mock-only construction hook, called at the end of the constructor; a no-op meant for * `vi.spyOn(WorkspaceMobileDrawer.prototype, 'constructor4__')`. */ constructor4__(): void; /** * Expands the drawer. The mock sets {@link WorkspaceMobileDrawer.collapsed} to `false`. */ expand(): void; /** * Flips the drawer between collapsed and expanded. */ toggle(): void; }