import { useMemo, useState } from 'react'; import { useParams } from 'react-router-dom'; import { useQuery } from '@tanstack/react-query'; import { useTrackedMutation } from '../hooks/useTrackedMutation'; import { listIntermediateCAs, retireIntermediateCA, type IntermediateCA } from '../api/client'; import PageHeader from '../components/PageHeader'; import ErrorState from '../components/ErrorState'; import { formatDateTime } from '../api/utils'; // IssuerHierarchyPage renders the operator-managed CA hierarchy for a // single issuer. Rank 8 of the 2026-05-03 deep-research deliverable. // // The recursive tree is built client-side from the flat list returned // by GET /api/v1/issuers/{id}/intermediates — each row's parent_ca_id // (nil = root) drives the nesting. We render with native HTML