import type { RailDeckDirectIntegrationClient as Client } from '@raildeck/frontend-sdk/direct-integration'; /** * Load a station and review the consequences before a separate confirmation. * @param client - Configured client; the caller owns current authority. * @param accountId - Authorised account for this workflow. * @param controllerId - Explicitly selected command station. * @param signal - Caller-owned cancellation signal. * @returns The record and deletion preview, without removing or operating the station. */ export async function prepareControllerRemoval( client: Client, accountId: string, controllerId: string, signal: AbortSignal, ) { const options = { signal, timeoutMs: 15_000 }; const controller = await client.controllers.get(accountId, controllerId, options); const consequences = await client.controllers.getDeletionPreview(accountId, controllerId, options); return { controller, consequences }; }