/** * Side-effect hook that redirects users away from the create flow when a * pipeline already exists and is meaningfully configured. * * Behavior: * - No-op while the SDK client is unavailable. * - No-op for v1 clients: the v1 transformer hardcodes `active: true`, so the * active state cannot be observed reliably. * - For v2 clients, navigates to `PATHS.MANAGE_DASHBOARD` (with `replace: true`) * when `getPipeline()` resolves with `active === true` AND `config.targets` is * non-empty AND at least one source in `config.sources` is deployed. The * selected pipeline (or `default` when the host omitted `pipelineName`) is * fetched by `useGetPipelineQuery`. A scaffold returned by the backend has * `active: true` with empty sources and targets, so the active flag alone * cannot distinguish a real ongoing pipeline from an unconfigured one. * * "Deployed" is decided per source, not from the pipeline-level `active` * flag: the create wizard stores the source under test with `active: false` * via a merge `PATCH` that deliberately leaves the pipeline-level flag alone * (testing a source must never stop a running pipeline), so a scaffold's * `active: true` survives every wizard write. Reading the pipeline-level flag * alone would eject the user to Manage mid-wizard. * - Fires at most once per component instance (StrictMode-safe). */ export declare const useRedirectIfPipelineExists: (isAddSource?: boolean) => void;