<?php if (isset($component)) { $__componentOriginal1770d22cf5af24e47b162c0db36175e7 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal1770d22cf5af24e47b162c0db36175e7 = $attributes; } ?>
<?php $component = App\View\Components\TechLayout::resolve([] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('tech-layout'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\App\View\Components\TechLayout::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes([]); ?>
    <a href="<?php echo e(route(auth()->user()->homeRoute())); ?>" class="btn btn-light border btn-sm mb-3">
        <i class="bi bi-arrow-left me-1"></i>Назад
    </a>

    <div class="mb-3">
        <h1 class="h5 fw-semibold mb-0"><?php echo e($printer->manufacturer); ?> <?php echo e($printer->model); ?></h1>
        <div class="text-muted small"><?php echo e($printer->client->name); ?></div>
    </div>

    <div class="card border-0 shadow-sm mb-3">
        <div class="card-body">
            <dl class="row mb-0 small">
                <dt class="col-5 text-muted">Сериски број</dt><dd class="col-7"><?php echo e($printer->serial_number); ?></dd>
                <dt class="col-5 text-muted">Статус</dt><dd class="col-7"><?php echo e($printer->status->label()); ?></dd>
                <dt class="col-5 text-muted">Инсталација</dt><dd class="col-7"><?php echo e(optional($printer->installation_date)->format('d.m.Y') ?: '—'); ?></dd>
            </dl>
        </div>
    </div>

    <div class="card border-0 shadow-sm">
        <div class="card-header bg-white fw-medium">Читања</div>
        <div class="table-responsive">
            <table class="table align-middle mb-0 small">
                <thead>
                    <tr><th>Датум</th><th class="text-end">Црно-бело</th><th class="text-end">Боја</th><th class="text-end">Скен</th><th>Тонер</th><th>Техничар</th></tr>
                </thead>
                <tbody>
                    <?php $__empty_1 = true; $__currentLoopData = $log; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $row): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                        <?php ($r = $row['reading']); ?>
                        <tr>
                            <td class="text-nowrap"><?php echo e($r->reading_date->format('d.m.Y')); ?></td>
                            <td class="text-end">
                                <?php echo e($r->bw_counter !== null ? number_format($r->bw_counter) : '—'); ?>

                                <?php if($row['bw_used'] !== null): ?><div class="text-muted">+<?php echo e(number_format($row['bw_used'])); ?></div><?php endif; ?>
                            </td>
                            <td class="text-end">
                                <?php echo e($r->color_counter !== null ? number_format($r->color_counter) : '—'); ?>

                                <?php if($row['color_used'] !== null): ?><div class="text-muted">+<?php echo e(number_format($row['color_used'])); ?></div><?php endif; ?>
                            </td>
                            <td class="text-end">
                                <?php echo e($r->scan_counter !== null ? number_format($r->scan_counter) : '—'); ?>

                                <?php if($row['scan_used'] !== null): ?><div class="text-muted">+<?php echo e(number_format($row['scan_used'])); ?></div><?php endif; ?>
                            </td>
                            <td class="text-nowrap">
                                <?php if($r->toner_black || $r->toner_cyan || $r->toner_magenta || $r->toner_yellow): ?>
                                    B<?php echo e($r->toner_black ?? '–'); ?> C<?php echo e($r->toner_cyan ?? '–'); ?> M<?php echo e($r->toner_magenta ?? '–'); ?> Y<?php echo e($r->toner_yellow ?? '–'); ?>

                                <?php else: ?> — <?php endif; ?>
                            </td>
                            <td><?php echo e($r->technician?->name ?? '—'); ?></td>
                        </tr>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                        <tr><td colspan="6" class="text-center text-muted py-4">Сè уште нема читања</td></tr>
                    <?php endif; ?>
                </tbody>
            </table>
        </div>
    </div>
 <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal1770d22cf5af24e47b162c0db36175e7)): ?>
<?php $attributes = $__attributesOriginal1770d22cf5af24e47b162c0db36175e7; ?>
<?php unset($__attributesOriginal1770d22cf5af24e47b162c0db36175e7); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal1770d22cf5af24e47b162c0db36175e7)): ?>
<?php $component = $__componentOriginal1770d22cf5af24e47b162c0db36175e7; ?>
<?php unset($__componentOriginal1770d22cf5af24e47b162c0db36175e7); ?>
<?php endif; ?>
<?php /**PATH /Users/gego/Desktop/sterna/resources/views/printers/book.blade.php ENDPATH**/ ?>