<?php if (isset($component)) { $__componentOriginal166a02a7c5ef5a9331faf66fa665c256 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal166a02a7c5ef5a9331faf66fa665c256 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'filament-panels::components.page.index','data' => []] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('filament-panels::page'); ?>
<?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([]); ?>

    <style>
        th,
        td {
            padding-left: 0.5rem;
            padding-right: 0.5rem;
            padding-top: 0.25rem;
            padding-bottom: 0.25rem;
        }
    </style>

    <div class="p-4 rounded ">

        <div class="border-b mb-4">
            <div class="flex space-x-2">
                <?php $__currentLoopData = $tabs; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $label): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                    <button wire:click="$set('activeTab', '<?php echo e($key); ?>'); window.Livewire.find('<?php echo e($_instance->getId()); ?>').results = collect();"
                        class="px-4 py-2 rounded-t-md <?php echo e($activeTab === $key ? 'bg-primary-600 text-white' : 'bg-gray-100 dark:bg-gray-700 dark:text-gray-300'); ?>">
                        <?php echo e($label); ?>

                    </button>
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
            </div>
        </div>


        <?php echo e($this->form); ?>




    </div>



    <div class="p-4 shadow rounded-xl space-y-4">

        <div>
            <?php
                $from = $fromDate ? \Carbon\Carbon::parse($fromDate)->format('Y-m-d') : '-';
                $to = $toDate ? \Carbon\Carbon::parse($toDate)->format('Y-m-d') : '-';
                $accName = $selectedAccountId ? \App\Models\Account::find($selectedAccountId)?->name : '-';
                $itemName = $selectedItemId ? \App\Models\Item::find($selectedItemId)?->name : '-';
            ?>


            <?php if($activeTab === 'journal'): ?>
                <h3 class="text-lg font-bold mt-4 mb-2 text-center">Journal Report</h3>
                <p class="text-center text-sm mb-4"><?php echo e($this->getSelectedDateRange()); ?></p>
                <?php echo $__env->make('ReportElems.journal-table', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?>
            <?php elseif($activeTab === 'stock'): ?>
                <h3 class="text-lg font-bold mt-4 mb-2 text-center">Stock Report</h3>
                <p class="text-center text-sm mb-4">As of: <?php echo e($this->getToDateFormatted()); ?></p>
                <?php echo $__env->make('ReportElems.stock-table', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?>
            <?php elseif($activeTab === 'item_ledger'): ?>
                <h3 class="text-lg font-bold mt-4 mb-2 text-center">Item Ledger Report</h3>
                <p class="text-center text-sm mb-4">
                    <?php echo e($this->getSelectedDateRange()); ?> | Item: <?php echo e($this->getSelectedItemName()); ?>

                </p>
                <?php echo $__env->make('ReportElems.item-ledger-table', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?>
            <?php elseif($activeTab === 'account_ledger'): ?>
                <h3 class="text-lg font-bold mt-4 mb-2 text-center">Account Ledger Report</h3>
                <p class="text-center text-sm mb-4">
                    <?php echo e($this->getSelectedDateRange()); ?> | Account: <?php echo e($this->getSelectedAccountName()); ?>

                </p>
                <?php echo $__env->make('ReportElems.account-ledger-table', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?>
            <?php elseif($activeTab === 'account_retreval'): ?>
                <h3 class="text-lg font-bold mt-4 mb-2 text-center">Account Balances Report</h3>
                <p class="text-center text-sm mb-4">
                    As of: <?php echo e($this->getToDateFormatted()); ?>

                </p>
                <?php echo $__env->make('ReportElems.account-retrieval-table', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?>
            <?php elseif($activeTab === 'gold_trade'): ?>
                <h3 class="text-lg font-bold mt-4 mb-2 text-center"><?php echo e($this->getSelectedTradeType()); ?></h3>
                <p class="text-center text-sm mb-4">
                    <?php echo e($this->getSelectedDateRange()); ?> | Item:
                    <?php echo e($this->getSelectedItemName()); ?> | Account: <?php echo e($this->getSelectedAccountName()); ?>

                </p>
                <?php echo $__env->make('ReportElems.gold-trade-table', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?>
            <?php elseif($activeTab === 'profit_report'): ?>
                <h3 class="text-lg font-bold mt-4 mb-2 text-center">Profit Report</h3>
                <p class="text-center text-sm mb-4"><?php echo e($this->getSelectedDateRange()); ?></p>
                <?php echo $__env->make('ReportElems.profit-report-table', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?>
            <?php endif; ?>
        </div>


    </div>



 <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal166a02a7c5ef5a9331faf66fa665c256)): ?>
<?php $attributes = $__attributesOriginal166a02a7c5ef5a9331faf66fa665c256; ?>
<?php unset($__attributesOriginal166a02a7c5ef5a9331faf66fa665c256); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal166a02a7c5ef5a9331faf66fa665c256)): ?>
<?php $component = $__componentOriginal166a02a7c5ef5a9331faf66fa665c256; ?>
<?php unset($__componentOriginal166a02a7c5ef5a9331faf66fa665c256); ?>
<?php endif; ?>
<?php /**PATH D:\wamp\www\LaravelPHP\GoldPlus\resources\views\filament\pages\reports.blade.php ENDPATH**/ ?>