@lang('admin::app.settings.data-transfer.imports.import.title') @php /** * Each import walks a different set of phases, so the stepper is built * from the import itself rather than from a fixed list. A delete run has * no images to fetch and nothing to link; an importer that carries no * image references skips that phase too. */ $isDelete = $import->action === 'delete'; $prefix = 'admin::app.settings.data-transfer.imports.import.'; $importSteps = [trans($prefix.'step-validate')]; $stepMap = [ 'pending' => 0, 'validating' => 0, 'validated' => 1, ]; /** * Images are fetched up-front, in a phase of their own, so the create * step never blocks on the network — the create jobs only ever read * files that are already on disk. */ if (! $isDelete && $hasImagePhase) { $importSteps[] = trans($prefix.'step-download'); $stepMap['downloading'] = count($importSteps) - 1; } $importSteps[] = trans($prefix.($isDelete ? 'step-delete' : 'step-create')); $stepMap['processing'] = count($importSteps) - 1; if ($hasLinkPhase) { $importSteps[] = trans($prefix.'step-link'); } $stepMap['linking'] = count($importSteps) - 1; if ($hasIndexPhase) { $importSteps[] = trans($prefix.'step-index'); } $stepMap['indexing'] = count($importSteps) - 1; $stepMap['completed'] = count($importSteps); @endphp @pushOnce('scripts') @endPushOnce