<?php if(isset($publicationHistory) && ! $publicationHistory->isEmpty()): ?>
    <section aria-label="Histórico de publicação" class="rounded-xl border border-slate-200 bg-white p-6 shadow-sm">
        <h2 class="text-sm font-semibold uppercase tracking-wide text-slate-500">Histórico de publicação</h2>
        <p class="mt-1 text-sm text-slate-600">Quem publicou, resposta do canal e tentativas.</p>

        <ol class="mt-5 space-y-3">
            <?php $__currentLoopData = $publicationHistory->items; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                <li class="rounded-lg border border-slate-100 px-4 py-3 text-sm">
                    <div class="flex flex-wrap items-start justify-between gap-2">
                        <div class="min-w-0">
                            <p class="font-medium text-slate-900">
                                <?php echo e($item->publisherName); ?>

                                <span class="font-normal text-slate-500">· <?php echo e($item->eventLabel); ?></span>
                            </p>
                            <p class="mt-1 text-slate-700"><?php echo e($item->message); ?></p>

                            <dl class="mt-2 grid gap-1 text-xs text-slate-500 sm:grid-cols-2">
                                <div>
                                    <dt class="inline">Quando:</dt>
                                    <dd class="inline font-medium text-slate-700"><?php echo e($item->occurredAtLabel()); ?></dd>
                                </div>
                                <?php if($item->actorName): ?>
                                    <div>
                                        <dt class="inline">Quem:</dt>
                                        <dd class="inline font-medium text-slate-700"><?php echo e($item->actorName); ?></dd>
                                    </div>
                                <?php endif; ?>
                                <div>
                                    <dt class="inline">Tentativa:</dt>
                                    <dd class="inline font-medium text-slate-700"><?php echo e($item->attempt); ?></dd>
                                </div>
                                <?php if($item->externalUrl): ?>
                                    <div class="sm:col-span-2">
                                        <dt class="inline">Resposta:</dt>
                                        <dd class="inline">
                                            <a href="<?php echo e($item->externalUrl); ?>" target="_blank" rel="noopener noreferrer" class="font-medium text-emerald-700 hover:underline">
                                                <?php echo e($item->externalUrl); ?>

                                            </a>
                                        </dd>
                                    </div>
                                <?php endif; ?>
                                <?php if($item->error): ?>
                                    <div class="sm:col-span-2">
                                        <dt class="inline text-red-600">Erro:</dt>
                                        <dd class="inline font-medium text-red-700"><?php echo e($item->error); ?></dd>
                                    </div>
                                <?php endif; ?>
                            </dl>
                        </div>

                        <?php if($item->level->value === 'error'): ?>
                            <span class="rounded-full border border-red-200 bg-red-50 px-2 py-0.5 text-xs font-semibold text-red-800">Erro</span>
                        <?php endif; ?>
                    </div>
                </li>
            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
        </ol>
    </section>
<?php endif; ?>
<?php /**PATH /var/www/html/backend/resources/views/properties/partials/publication-history.blade.php ENDPATH**/ ?>