
<?php $__env->startSection('title', 'Detail Produk'); ?>
<?php $__env->startSection('content'); ?>

<div class="container">
    <div class="d-flex justify-content-between align-items-start flex-lg-row flex-column">

        
        <div class="text-center p-4 pt-0 d-flex flex-column">
            <div class="upload-box">
                <?php if($product->image): ?>
                    <img class="preview-img" src="<?php echo e(asset($product->image)); ?>" alt="Product image">
                <?php else: ?>
                    <div style="padding-top:30px">Tidak Ada Gambar</div>
                <?php endif; ?>
            </div>
        </div>

        
        <div class="w-100">

            <div class="mb-3">
                <label class="field-label">Nama Produk</label>
                <input type="text" class="form-control field-value" value="<?php echo e($product->name); ?>" disabled>
            </div>

            <div class="row">
                <div class="col-md-6 mb-3">
                    <label class="field-label">Harga</label>
                    <input type="text" class="form-control field-value" 
                        value="Rp <?php echo e(number_format($product->price,0,',','.')); ?>" disabled>
                </div>

                <div class="col-md-6 mb-3">
                    <label class="field-label">Harga Reseller</label>
                    <input type="text" class="form-control field-value"
                        value="<?php echo e($product->reseller_price ? 'Rp ' . number_format($product->reseller_price,0,',','.') : '-'); ?>"
                        disabled>
                </div>
            </div>

            <div class="mb-3">
                <label class="field-label">Deskripsi</label>
                <textarea class="form-control field-value" rows="4" disabled><?php echo e($product->description); ?></textarea>
            </div>

            <div class="mb-3">
                <label class="field-label">Tersedia untuk Reseller</label>
                <input type="text" class="form-control field-value" 
                    value="<?php echo e($product->available_for_reseller ? 'Ya' : 'Tidak'); ?>" disabled>
            </div>

            <div class="d-flex justify-content-between pe-2 mt-4">
                <?php if (isset($component)) { $__componentOriginalb04da7a8feb93a7268b6e0eef6b32739 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginalb04da7a8feb93a7268b6e0eef6b32739 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.gold-button','data' => ['type' => 'button','onclick' => 'window.location.href=\''.e(route('products.index')).'\'']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('gold-button'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes(['type' => 'button','onclick' => 'window.location.href=\''.e(route('products.index')).'\'']); ?>
                    <i class="bi bi-arrow-left"></i> Kembali
                 <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginalb04da7a8feb93a7268b6e0eef6b32739)): ?>
<?php $attributes = $__attributesOriginalb04da7a8feb93a7268b6e0eef6b32739; ?>
<?php unset($__attributesOriginalb04da7a8feb93a7268b6e0eef6b32739); ?>
<?php endif; ?>
<?php if (isset($__componentOriginalb04da7a8feb93a7268b6e0eef6b32739)): ?>
<?php $component = $__componentOriginalb04da7a8feb93a7268b6e0eef6b32739; ?>
<?php unset($__componentOriginalb04da7a8feb93a7268b6e0eef6b32739); ?>
<?php endif; ?>

                <?php if (isset($component)) { $__componentOriginald0f1fd2689e4bb7060122a5b91fe8561 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginald0f1fd2689e4bb7060122a5b91fe8561 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.button','data' => ['type' => 'button','onclick' => 'window.location.href=\''.e(route('products.edit', $product->id)).'\'']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('button'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes(['type' => 'button','onclick' => 'window.location.href=\''.e(route('products.edit', $product->id)).'\'']); ?>
                    Edit Produk
                 <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginald0f1fd2689e4bb7060122a5b91fe8561)): ?>
<?php $attributes = $__attributesOriginald0f1fd2689e4bb7060122a5b91fe8561; ?>
<?php unset($__attributesOriginald0f1fd2689e4bb7060122a5b91fe8561); ?>
<?php endif; ?>
<?php if (isset($__componentOriginald0f1fd2689e4bb7060122a5b91fe8561)): ?>
<?php $component = $__componentOriginald0f1fd2689e4bb7060122a5b91fe8561; ?>
<?php unset($__componentOriginald0f1fd2689e4bb7060122a5b91fe8561); ?>
<?php endif; ?>
            </div>

        </div>

    </div>
</div>

<?php $__env->stopSection(); ?>

<?php echo $__env->make('layout.main', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH C:\PAW\PiaZhang\resources\views/products/show.blade.php ENDPATH**/ ?>