import { useEffect, useMemo, useState } from 'react' import { useTranslation } from 'react-i18next' import { Alert, Badge, Button, LoadingBlock, Modal, TextInput } from '@/ui' import { WarningIcon, XCircleIcon } from '@phosphor-icons/react' import { useCascadePreview } from '@/api/queries' import { useCascadeCloseRecord } from '@/api/mutations' import type { CascadeEntry, OnCloseAction } from '@/api/client' /** * Cascade close confirmation dialog — Phase 3 dict-relationships-v2. * *
Поток: *
UX guards: *
{hasBlockers ? t('cascade.summary.blocked', { blockers: plan.blockers.length, target: businessKey, }) : t('cascade.summary.willClose', { total: totalToClose, target: businessKey, })}
{/* BLOCKERS section — non-resolvable. */} {plan.blockers.length > 0 && ({t('cascade.blockers.resolveFirst')}
{t('cascade.warnings.note')}