import type { Key } from '@astrale-os/sdk/schema' import type { App, ResolvedView } from '@astrale-os/shell' import type { Action } from '../../graph/action.js' import { useAction } from '../../graph/action.js' import { useShell } from '../../session/shell.hook.js' /** Resolve one installed Domain's ordinary entry View. */ export function useOpenApp(): Action<[App | Key.Origin], ResolvedView | null> { const shell = useShell() return useAction((app: App | Key.Origin) => shell.apps.open(app)) }