<?php $__env->startSection('title', $member->name . ' - সদস্য বিবরণ'); ?>

<?php $__env->startSection('content'); ?>
<div class="container-fluid">
    <!-- ব্রেডক্রাম্ব -->
    <nav aria-label="breadcrumb">
        <ol class="breadcrumb">
            <li class="breadcrumb-item"><a href="<?php echo e(route('dashboard')); ?>">ড্যাশবোর্ড</a></li>
            <li class="breadcrumb-item"><a href="<?php echo e(route('members.index')); ?>">সদস্য তালিকা</a></li>
            <li class="breadcrumb-item active" aria-current="page"><?php echo e($member->name); ?></li>
        </ol>
    </nav>
    
    <!-- সদস্য হেডার -->
    <div class="card shadow mb-4">
        <div class="card-body">
            <div class="row">
                <div class="col-lg-2 text-center">
                    <?php if($member->photo): ?>
                    <img src="<?php echo e(asset('storage/' . $member->photo)); ?>" 
                         class="img-fluid rounded-circle" 
                         style="width: 150px; height: 150px; object-fit: cover; border: 3px solid var(--primary-color);">
                    <?php else: ?>
                    <div class="rounded-circle bg-primary d-flex align-items-center justify-content-center mx-auto" 
                         style="width: 150px; height: 150px;">
                        <i class="fas fa-user fa-4x text-white"></i>
                    </div>
                    <?php endif; ?>
                    
                    <div class="mt-3">
                        <h5 class="mb-0"><?php echo e($member->name); ?></h5>
                        <p class="text-muted"><?php echo e($member->member_id); ?></p>
                    </div>
                    
                    <div class="d-grid gap-2">
                        <a href="<?php echo e(route('members.print-card', $member->id)); ?>" class="btn btn-outline-primary" target="_blank">
                            <i class="fas fa-print me-1"></i>কার্ড প্রিন্ট
                        </a>
                        <a href="<?php echo e(route('members.edit', $member->id)); ?>" class="btn btn-outline-warning">
                            <i class="fas fa-edit me-1"></i>সম্পাদনা
                        </a>
                    </div>
                </div>
                
                <div class="col-lg-10">
                    <div class="row">
                        <div class="col-md-6">
                            <table class="table table-bordered table-sm">
                                <tr>
                                    <th width="40%">সদস্য নং:</th>
                                    <td><?php echo e($member->member_id); ?></td>
                                </tr>
                                <tr>
                                    <th>নাম:</th>
                                    <td><?php echo e($member->name); ?></td>
                                </tr>
                                <tr>
                                    <th>পিতার নাম:</th>
                                    <td><?php echo e($member->father_name); ?></td>
                                </tr>
                                <tr>
                                    <th>মাতার নাম:</th>
                                    <td><?php echo e($member->mother_name); ?></td>
                                </tr>
                                <tr>
                                    <th>জন্ম তারিখ:</th>
                                    <td>
                                        <?php if($member->date_of_birth): ?>
                                            <?php echo e(\Carbon\Carbon::parse($member->date_of_birth)->format('d/m/Y')); ?> 
                                            <?php if($member->age): ?>
                                                (বয়স: <?php echo e($member->age); ?> বছর)
                                            <?php endif; ?>
                                        <?php else: ?>
                                            তারিখ পাওয়া যায়নি
                                        <?php endif; ?>
                                    </td>
                                </tr>
                                <tr>
                                    <th>এনআইডি:</th>
                                    <td><?php echo e($member->nid); ?></td>
                                </tr>
                            </table>
                        </div>
                        
                        <div class="col-md-6">
                            <table class="table table-bordered table-sm">
                                <tr>
                                    <th width="40%">ফোন:</th>
                                    <td><?php echo e($member->formatted_phone ?? $member->phone); ?></td>
                                </tr>
                                <tr>
                                    <th>ইমেইল:</th>
                                    <td><?php echo e($member->email ?? 'N/A'); ?></td>
                                </tr>
                                <tr>
                                    <th>পেশা:</th>
                                    <td><?php echo e($member->occupation); ?></td>
                                </tr>
                                <tr>
                                    <th>নিবন্ধন তারিখ:</th>
                                    <td>
                                        <?php if($member->registration_date): ?>
                                            <?php echo e(\Carbon\Carbon::parse($member->registration_date)->format('d/m/Y')); ?>

                                        <?php else: ?>
                                            তারিখ পাওয়া যায়নি
                                        <?php endif; ?>
                                    </td>
                                </tr>
                                <tr>
                                    <th>অবস্থা:</th>
                                    <td>
                                        <span class="badge bg-<?php echo e($member->status == 'active' ? 'success' : ($member->status == 'inactive' ? 'warning' : 'danger')); ?>">
                                            <?php echo e($member->status_in_bangla ?? $member->status); ?>

                                        </span>
                                    </td>
                                </tr>
                                <tr>
                                    <th>অনুমোদন:</th>
                                    <td>
                                        <span class="badge bg-<?php echo e($member->approval_status == 'approved' ? 'success' : ($member->approval_status == 'pending' ? 'warning' : 'danger')); ?>">
                                            <?php echo e($member->approval_status == 'approved' ? 'অনুমোদিত' : ($member->approval_status == 'pending' ? 'অপেক্ষমান' : 'প্রত্যাখ্যান')); ?>

                                        </span>
                                    </td>
                                </tr>
                            </table>
                        </div>
                    </div>
                    
                    <div class="row mt-3">
                        <div class="col-12">
                            <h6><i class="fas fa-map-marker-alt me-1"></i>ঠিকানা</h6>
                            <div class="row">
                                <div class="col-md-6">
                                    <strong>বর্তমান:</strong>
                                    <p class="mb-1"><?php echo e($member->present_address); ?></p>
                                </div>
                                <div class="col-md-6">
                                    <strong>স্থায়ী:</strong>
                                    <p class="mb-0"><?php echo e($member->permanent_address); ?></p>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    
    <!-- সদস্য কার্ড -->
    <div class="row">
        <!-- আর্থিক সারাংশ -->
        <div class="col-xl-3 col-md-6 mb-4">
            <div class="card stat-card border-left-primary shadow h-100">
                <div class="card-body">
                    <div class="d-flex justify-content-between align-items-center">
                        <div>
                            <div class="text-xs font-weight-bold text-primary text-uppercase mb-1">
                                মাসিক সঞ্চয়
                            </div>
                            <div class="h5 mb-0 font-weight-bold text-gray-800">
                                <?php echo e(number_format($member->monthly_saving, 2)); ?> টাকা
                            </div>
                        </div>
                        <i class="fas fa-piggy-bank fa-2x text-primary"></i>
                    </div>
                </div>
            </div>
        </div>
        
        <div class="col-xl-3 col-md-6 mb-4">
            <div class="card stat-card border-left-success shadow h-100">
                <div class="card-body">
                    <div class="d-flex justify-content-between align-items-center">
                        <div>
                            <div class="text-xs font-weight-bold text-success text-uppercase mb-1">
                                মোট সঞ্চয়
                            </div>
                            <div class="h5 mb-0 font-weight-bold text-gray-800">
                                <?php echo e(number_format($member->total_savings, 2)); ?> টাকা
                            </div>
                        </div>
                        <i class="fas fa-wallet fa-2x text-success"></i>
                    </div>
                </div>
            </div>
        </div>
        
        <div class="col-xl-3 col-md-6 mb-4">
            <div class="card stat-card border-left-info shadow h-100">
                <div class="card-body">
                    <div class="d-flex justify-content-between align-items-center">
                        <div>
                            <div class="text-xs font-weight-bold text-info text-uppercase mb-1">
                                মোট ঋণ
                            </div>
                            <div class="h5 mb-0 font-weight-bold text-gray-800">
                                <?php echo e(number_format($member->total_loans, 2)); ?> টাকা
                            </div>
                        </div>
                        <i class="fas fa-hand-holding-usd fa-2x text-info"></i>
                    </div>
                </div>
            </div>
        </div>
        
        <div class="col-xl-3 col-md-6 mb-4">
            <div class="card stat-card border-left-warning shadow h-100">
                <div class="card-body">
                    <div class="d-flex justify-content-between align-items-center">
                        <div>
                            <div class="text-xs font-weight-bold text-warning text-uppercase mb-1">
                                বকেয়া ঋণ
                            </div>
                            <div class="h5 mb-0 font-weight-bold text-gray-800">
                                <?php echo e(number_format($member->total_loan_due, 2)); ?> টাকা
                            </div>
                        </div>
                        <i class="fas fa-clock fa-2x text-warning"></i>
                    </div>
                </div>
            </div>
        </div>
    </div>
    
    <!-- ট্যাব নেভিগেশন -->
    <div class="card shadow">
        <div class="card-header py-3">
            <ul class="nav nav-tabs card-header-tabs" id="memberTab" role="tablist">
                <li class="nav-item" role="presentation">
                    <button class="nav-link active" id="savings-tab" data-bs-toggle="tab" 
                            data-bs-target="#savings" type="button" role="tab">
                        <i class="fas fa-piggy-bank me-1"></i>সঞ্চয়
                    </button>
                </li>
                <li class="nav-item" role="presentation">
                    <button class="nav-link" id="loans-tab" data-bs-toggle="tab" 
                            data-bs-target="#loans" type="button" role="tab">
                        <i class="fas fa-hand-holding-usd me-1"></i>ঋণ
                    </button>
                </li>
                <li class="nav-item" role="presentation">
                    <button class="nav-link" id="nominee-tab" data-bs-toggle="tab" 
                            data-bs-target="#nominee" type="button" role="tab">
                        <i class="fas fa-user-friends me-1"></i>নমিনি
                    </button>
                </li>
                <li class="nav-item" role="presentation">
                    <button class="nav-link" id="documents-tab" data-bs-toggle="tab" 
                            data-bs-target="#documents" type="button" role="tab">
                        <i class="fas fa-file-alt me-1"></i>ডকুমেন্টস
                    </button>
                </li>
                <li class="nav-item" role="presentation">
                    <button class="nav-link" id="activities-tab" data-bs-toggle="tab" 
                            data-bs-target="#activities" type="button" role="tab">
                        <i class="fas fa-history me-1"></i>কার্যক্রম
                    </button>
                </li>
            </ul>
        </div>
        <div class="card-body">
            <div class="tab-content" id="memberTabContent">
                <!-- সঞ্চয় ট্যাব -->
                <div class="tab-pane fade show active" id="savings" role="tabpanel">
                    <div class="d-flex justify-content-between align-items-center mb-3">
                        <h6 class="mb-0">সঞ্চয় ইতিহাস</h6>
                        <a href="<?php echo e(route('savings.create', ['member_id' => $member->member_id])); ?>" 
                           class="btn btn-primary btn-sm">
                            <i class="fas fa-plus me-1"></i>সঞ্চয় সংগ্রহ
                        </a>
                    </div>
                    
                    <?php if($monthlySavings->count() > 0): ?>
                    <div class="table-responsive">
                        <table class="table table-bordered table-sm">
                            <thead>
                                <tr>
                                    <th>মাস-বছর</th>
                                    <th>পরিমাণ</th>
                                    <th>পরিশোধ তারিখ</th>
                                    <th>পদ্ধতি</th>
                                    <th>অবস্থা</th>
                                    <th>লেট ফি</th>
                                    <th>মোট</th>
                                </tr>
                            </thead>
                            <tbody>
                                <?php $__currentLoopData = $monthlySavings; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $saving): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <tr>
                                    <td><?php echo e($saving->bangla_month ?? $saving->month_year); ?></td>
                                    <td><?php echo e(number_format($saving->amount, 2)); ?> টাকা</td>
                                    <td>
                                        <?php if($saving->payment_date): ?>
                                            <?php echo e(\Carbon\Carbon::parse($saving->payment_date)->format('d/m/Y')); ?>

                                        <?php else: ?>
                                            N/A
                                        <?php endif; ?>
                                    </td>
                                    <td><?php echo e($saving->payment_method_in_bangla ?? $saving->payment_method); ?></td>
                                    <td>
                                        <span class="badge bg-<?php echo e($saving->status == 'paid' ? 'success' : ($saving->status == 'pending' ? 'warning' : 'danger')); ?>">
                                            <?php echo e($saving->status_in_bangla ?? $saving->status); ?>

                                        </span>
                                    </td>
                                    <td><?php echo e(number_format($saving->late_fee, 2)); ?> টাকা</td>
                                    <td><?php echo e(number_format($saving->total_paid, 2)); ?> টাকা</td>
                                </tr>
                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                            </tbody>
                            <tfoot>
                                <tr class="table-dark">
                                    <td colspan="6" class="text-end"><strong>মোট:</strong></td>
                                    <td><strong><?php echo e(number_format($monthlySavings->where('status', 'paid')->sum('total_paid'), 2)); ?> টাকা</strong></td>
                                </tr>
                            </tfoot>
                        </table>
                    </div>
                    <?php else: ?>
                    <div class="text-center py-4">
                        <i class="fas fa-piggy-bank fa-3x text-muted mb-3"></i>
                        <h6 class="text-muted">কোন সঞ্চয় রেকর্ড নেই</h6>
                    </div>
                    <?php endif; ?>
                </div>
                
                <!-- ঋণ ট্যাব -->
                <div class="tab-pane fade" id="loans" role="tabpanel">
                    <div class="d-flex justify-content-between align-items-center mb-3">
                        <h6 class="mb-0">ঋণ ইতিহাস</h6>
                        <a href="<?php echo e(route('loans.create', ['member_id' => $member->member_id])); ?>" 
                           class="btn btn-success btn-sm">
                            <i class="fas fa-plus me-1"></i>নতুন ঋণ
                        </a>
                    </div>
                    
                    <?php if($loans->count() > 0): ?>
                    <div class="table-responsive">
                        <table class="table table-bordered table-sm">
                            <thead>
                                <tr>
                                    <th>ঋণ নং</th>
                                    <th>তারিখ</th>
                                    <th>পরিমাণ</th>
                                    <th>সুদ</th>
                                    <th>মোট</th>
                                    <th>অবস্থা</th>
                                    <th>কার্যক্রম</th>
                                </tr>
                            </thead>
                            <tbody>
                                <?php $__currentLoopData = $loans; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $loan): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <tr>
                                    <td><?php echo e($loan->loan_number); ?></td>
                                    <td>
                                        <?php if($loan->loan_date): ?>
                                            <?php echo e(\Carbon\Carbon::parse($loan->loan_date)->format('d/m/Y')); ?>

                                        <?php else: ?>
                                            তারিখ পাওয়া যায়নি
                                        <?php endif; ?>
                                    </td>
                                    <td><?php echo e(number_format($loan->loan_amount, 2)); ?> টাকা</td>
                                    <td><?php echo e(number_format($loan->total_interest, 2)); ?> টাকা</td>
                                    <td><?php echo e(number_format($loan->total_payable, 2)); ?> টাকা</td>
                                    <td>
                                        <span class="badge bg-<?php echo e($loan->status == 'approved' ? 'info' : ($loan->status == 'active' ? 'warning' : ($loan->status == 'completed' ? 'success' : 'danger'))); ?>">
                                            <?php echo e($loan->status_in_bangla ?? $loan->status); ?>

                                        </span>
                                    </td>
                                    <td>
                                        <a href="<?php echo e(route('loans.show', $loan->id)); ?>" class="btn btn-sm btn-info">
                                            <i class="fas fa-eye"></i>
                                        </a>
                                    </td>
                                </tr>
                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                            </tbody>
                        </table>
                    </div>
                    <?php else: ?>
                    <div class="text-center py-4">
                        <i class="fas fa-hand-holding-usd fa-3x text-muted mb-3"></i>
                        <h6 class="text-muted">কোন ঋণ রেকর্ড নেই</h6>
                    </div>
                    <?php endif; ?>
                </div>
                
                <!-- নমিনি ট্যাব -->
                <div class="tab-pane fade" id="nominee" role="tabpanel">
                    <div class="row">
                        <div class="col-md-4 text-center">
                            <?php if($member->nominee_photo): ?>
                            <img src="<?php echo e(asset('storage/' . $member->nominee_photo)); ?>" 
                                 class="img-fluid rounded-circle mb-3" 
                                 style="width: 150px; height: 150px; object-fit: cover; border: 3px solid var(--warning);">
                            <?php else: ?>
                            <div class="rounded-circle bg-warning d-flex align-items-center justify-content-center mx-auto mb-3" 
                                 style="width: 150px; height: 150px;">
                                <i class="fas fa-user fa-4x text-white"></i>
                            </div>
                            <?php endif; ?>
                        </div>
                        
                        <div class="col-md-8">
                            <table class="table table-bordered">
                                <tr>
                                    <th width="30%">নাম:</th>
                                    <td><?php echo e($member->nominee_name); ?></td>
                                </tr>
                                <tr>
                                    <th>সম্পর্ক:</th>
                                    <td><?php echo e($member->nominee_relation); ?></td>
                                </tr>
                                <tr>
                                    <th>এনআইডি:</th>
                                    <td><?php echo e($member->nominee_nid); ?></td>
                                </tr>
                                <tr>
                                    <th>নমিনি নিবন্ধন তারিখ:</th>
                                    <td>
                                        <?php if($member->registration_date): ?>
                                            <?php echo e(\Carbon\Carbon::parse($member->registration_date)->format('d/m/Y')); ?>

                                        <?php else: ?>
                                            তারিখ পাওয়া যায়নি
                                        <?php endif; ?>
                                    </td>
                                </tr>
                            </table>
                            
                            <div class="alert alert-info">
                                <h6 class="alert-heading"><i class="fas fa-info-circle me-1"></i>নমিনি সম্পর্কে</h6>
                                <p class="mb-0">নমিনি হলেন সেই ব্যক্তি যিনি সদস্যের অবর্তমানে বা মৃত্যু হলে সমিতির প্রাপ্য টাকা পাবেন।</p>
                            </div>
                        </div>
                    </div>
                </div>
                
                <!-- ডকুমেন্টস ট্যাব -->
                <div class="tab-pane fade" id="documents" role="tabpanel">
                    <div class="row">
                        <div class="col-md-6">
                            <div class="card mb-3">
                                <div class="card-header">
                                    <h6 class="mb-0"><i class="fas fa-id-card me-1"></i>সদস্য কার্ড</h6>
                                </div>
                                <div class="card-body text-center">
                                    <div class="mb-3">
                                        <i class="fas fa-id-card fa-4x text-primary mb-3"></i>
                                        <p>সদস্য কার্ড নং: <?php echo e($member->member_id); ?></p>
                                    </div>
                                    <a href="<?php echo e(route('members.print-card', $member->id)); ?>" class="btn btn-primary" target="_blank">
                                        <i class="fas fa-print me-1"></i>কার্ড প্রিন্ট করুন
                                    </a>
                                </div>
                            </div>
                        </div>
                        
                        <div class="col-md-6">
                            <div class="card mb-3">
                                <div class="card-header">
                                    <h6 class="mb-0"><i class="fas fa-file-contract me-1"></i>সদস্য ফর্ম</h6>
                                </div>
                                <div class="card-body">
                                    <ul class="list-group list-group-flush">
                                        <li class="list-group-item d-flex justify-content-between">
                                            <span>ফর্ম ফি:</span>
                                            <span>
                                                <?php if($member->form_fee_paid): ?>
                                                <span class="badge bg-success">পরিশোধিত</span>
                                                <?php else: ?>
                                                <span class="badge bg-danger">বকেয়া</span>
                                                <?php endif; ?>
                                            </span>
                                        </li>
                                        <li class="list-group-item d-flex justify-content-between">
                                            <span>ফর্ম নং:</span>
                                            <span><?php echo e($member->member_id); ?></span>
                                        </li>
                                        <li class="list-group-item d-flex justify-content-between">
                                            <span>নিবন্ধন তারিখ:</span>
                                            <span>
                                                <?php if($member->registration_date): ?>
                                                    <?php echo e(\Carbon\Carbon::parse($member->registration_date)->format('d/m/Y')); ?>

                                                <?php else: ?>
                                                    তারিখ পাওয়া যায়নি
                                                <?php endif; ?>
                                            </span>
                                        </li>
                                        <li class="list-group-item">
                                            <a href="#" class="btn btn-sm btn-outline-primary w-100">
                                                <i class="fas fa-download me-1"></i>ফর্ম ডাউনলোড
                                            </a>
                                        </li>
                                    </ul>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                
                <!-- কার্যক্রম ট্যাব -->
                <div class="tab-pane fade" id="activities" role="tabpanel">
                    <div class="list-group">
                        <div class="list-group-item">
                            <div class="d-flex w-100 justify-content-between">
                                <h6 class="mb-1">সদস্য নিবন্ধন</h6>
                                <small>
                                    <?php if($member->created_at): ?>
                                        <?php echo e($member->created_at->diffForHumans()); ?>

                                    <?php else: ?>
                                        তারিখ নেই
                                    <?php endif; ?>
                                </small>
                            </div>
                            <p class="mb-1">সদস্য হিসেবে নিবন্ধন সম্পন্ন হয়েছে।</p>
                            <small>সদস্য নং: <?php echo e($member->member_id); ?></small>
                        </div>
                        
                        <?php $__currentLoopData = $member->monthlySavings; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $saving): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                        <?php if($saving->status == 'paid'): ?>
                        <div class="list-group-item">
                            <div class="d-flex w-100 justify-content-between">
                                <h6 class="mb-1">সঞ্চয় পরিশোধ</h6>
                                <small>
                                    <?php if($saving->created_at): ?>
                                        <?php echo e($saving->created_at->diffForHumans()); ?>

                                    <?php else: ?>
                                        তারিখ নেই
                                    <?php endif; ?>
                                </small>
                            </div>
                            <p class="mb-1"><?php echo e($saving->bangla_month ?? $saving->month_year); ?> মাসের সঞ্চয় পরিশোধিত হয়েছে।</p>
                            <small>পরিমাণ: <?php echo e(number_format($saving->amount, 2)); ?> টাকা</small>
                        </div>
                        <?php endif; ?>
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                        
                        <?php $__currentLoopData = $member->loans; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $loan): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                        <div class="list-group-item">
                            <div class="d-flex w-100 justify-content-between">
                                <h6 class="mb-1">ঋণ <?php echo e($loan->status_in_bangla ?? $loan->status); ?></h6>
                                <small>
                                    <?php if($loan->created_at): ?>
                                        <?php echo e($loan->created_at->diffForHumans()); ?>

                                    <?php else: ?>
                                        তারিখ নেই
                                    <?php endif; ?>
                                </small>
                            </div>
                            <p class="mb-1">ঋণ নং: <?php echo e($loan->loan_number); ?></p>
                            <small>পরিমাণ: <?php echo e(number_format($loan->loan_amount, 2)); ?> টাকা</small>
                        </div>
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                    </div>
                </div>
            </div>
        </div>
    </div>
    
    <!-- কার্যক্রম বাটন -->
    <div class="row mt-4">
        <div class="col-12">
            <div class="card shadow">
                <div class="card-body">
                    <h6 class="mb-3">দ্রুত কার্যক্রম</h6>
                    <div class="btn-group" role="group">
                        <!-- স্ট্যাটাস পরিবর্তন -->
                        <div class="dropdown me-2">
                            <button class="btn btn-outline-primary dropdown-toggle" type="button" data-bs-toggle="dropdown">
                                <i class="fas fa-exchange-alt me-1"></i>স্ট্যাটাস পরিবর্তন
                            </button>
                            <ul class="dropdown-menu">
                                <li>
                                    <form action="<?php echo e(route('members.change-status', $member->id)); ?>" method="POST" style="display: inline;">
                                        <?php echo csrf_field(); ?>
                                        <input type="hidden" name="status" value="active">
                                        <button type="submit" class="dropdown-item">সক্রিয় করুন</button>
                                    </form>
                                </li>
                                <li>
                                    <form action="<?php echo e(route('members.change-status', $member->id)); ?>" method="POST" style="display: inline;">
                                        <?php echo csrf_field(); ?>
                                        <input type="hidden" name="status" value="inactive">
                                        <button type="submit" class="dropdown-item">নিষ্ক্রিয় করুন</button>
                                    </form>
                                </li>
                                <li>
                                    <form action="<?php echo e(route('members.change-status', $member->id)); ?>" method="POST" style="display: inline;">
                                        <?php echo csrf_field(); ?>
                                        <input type="hidden" name="status" value="terminated">
                                        <button type="submit" class="dropdown-item">বাতিল করুন</button>
                                    </form>
                                </li>
                            </ul>
                        </div>
                        
                        <!-- অনুমোদন পরিবর্তন -->
                        <div class="dropdown me-2">
                            <button class="btn btn-outline-info dropdown-toggle" type="button" data-bs-toggle="dropdown">
                                <i class="fas fa-check-circle me-1"></i>অনুমোদন পরিবর্তন
                            </button>
                            <ul class="dropdown-menu">
                                <li>
                                    <form action="<?php echo e(route('members.change-approval-status', $member->id)); ?>" method="POST" style="display: inline;">
                                        <?php echo csrf_field(); ?>
                                        <input type="hidden" name="approval_status" value="approved">
                                        <button type="submit" class="dropdown-item">অনুমোদন দিন</button>
                                    </form>
                                </li>
                                <li>
                                    <form action="<?php echo e(route('members.change-approval-status', $member->id)); ?>" method="POST" style="display: inline;">
                                        <?php echo csrf_field(); ?>
                                        <input type="hidden" name="approval_status" value="pending">
                                        <button type="submit" class="dropdown-item">অপেক্ষমান করুন</button>
                                    </form>
                                </li>
                                <li>
                                    <form action="<?php echo e(route('members.change-approval-status', $member->id)); ?>" method="POST" style="display: inline;">
                                        <?php echo csrf_field(); ?>
                                        <input type="hidden" name="approval_status" value="rejected">
                                        <button type="submit" class="dropdown-item">প্রত্যাখ্যান করুন</button>
                                    </form>
                                </li>
                            </ul>
                        </div>
                        
                        <!-- ফর্ম ফি পেমেন্ট -->
                        <?php if(!$member->form_fee_paid): ?>
                        <form action="<?php echo e(route('members.pay-form-fee', $member->id)); ?>" method="POST" style="display: inline;">
                            <?php echo csrf_field(); ?>
                            <button type="submit" class="btn btn-outline-success me-2">
                                <i class="fas fa-money-bill-wave me-1"></i>ফর্ম ফি পরিশোধ
                            </button>
                        </form>
                        <?php endif; ?>
                        
                        <!-- লগইন ক্রেডেনশিয়াল -->
                        <a href="#" class="btn btn-outline-secondary me-2" 
                           onclick="alert('ডিফল্ট পাসওয়ার্ড: ফোনের শেষ ৬ ডিজিট')">
                            <i class="fas fa-key me-1"></i>লগইন তথ্য
                        </a>
                        
                        <!-- রিসেট পাসওয়ার্ড -->
                        <a href="#" class="btn btn-outline-warning">
                            <i class="fas fa-redo me-1"></i>পাসওয়ার্ড রিসেট
                        </a>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<?php $__env->stopSection(); ?>

<?php $__env->startSection('scripts'); ?>
<script>
    // ট্যাব হ্যান্ডলিং
    document.addEventListener('DOMContentLoaded', function() {
        const triggerTabList = [].slice.call(document.querySelectorAll('#memberTab button'));
        triggerTabList.forEach(function (triggerEl) {
            const tabTrigger = new bootstrap.Tab(triggerEl);
            triggerEl.addEventListener('click', function (event) {
                event.preventDefault();
                tabTrigger.show();
            });
        });
    });
</script>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.app', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH /home/naowarin/somoti.naowarinternational.my.id/resources/views/members/show.blade.php ENDPATH**/ ?>