

<?php $__env->startSection('title', 'KYC Verification'); ?>

<?php $__env->startPush('styles'); ?>
<!-- Tailwind CDN with tw- prefix to match registration page -->
<script src="https://cdn.tailwindcss.com"></script>
<script>
    tailwind.config = {
        prefix: 'tw-',
        theme: {
            extend: {
                colors: {
                    orange: {
                        50: '#fff7ed',
                        100: '#ffedd5',
                        200: '#fed7aa',
                        600: '#ea580c',
                        800: '#9a3412',
                    }
                }
            }
        }
    }
</script>
<style>
    /* Fix potential Bootstrap/Tailwind conflicts */
    .form-control:focus { box-shadow: none; border-color: #f97316; }
    .tw-bg-orange-50 { background-color: #fff7ed !important; }
    .tw-border-orange-200 { border-color: #fed7aa !important; }
</style>
<?php $__env->stopPush(); ?>

<?php $__env->startSection('content'); ?>
<div class="container-fluid px-4 py-4">
    <!-- Header -->
    <div class="d-flex justify-content-between align-items-center mb-4">
        <div>
            <h3 class="fw-bold text-dark mb-1">KYC Verification</h3>
            <p class="text-muted mb-0">Update your company verification documents</p>
        </div>
        <?php if($seller->kyc_status === 'verified'): ?>
            <span class="badge bg-success rounded-pill px-4 py-2 fs-6 shadow-sm">
                <i class="bi bi-patch-check-fill me-2"></i>Verified
            </span>
        <?php elseif($seller->kyc_status === 'submitted'): ?>
            <span class="badge bg-info text-white rounded-pill px-4 py-2 fs-6 shadow-sm">
                <i class="bi bi-hourglass-split me-2"></i>Under Review
            </span>
        <?php else: ?>
            <span class="badge bg-warning text-dark rounded-pill px-4 py-2 fs-6 shadow-sm">
                <i class="bi bi-exclamation-circle me-2"></i>Pending Verification
            </span>
        <?php endif; ?>
    </div>

    <?php if(session('success')): ?>
        <div class="alert alert-success alert-dismissible fade show rounded-4 shadow-sm border-0" role="alert">
            <div class="d-flex align-items-center">
                <i class="bi bi-check-circle-fill fs-4 me-3"></i>
                <div><?php echo e(session('success')); ?></div>
            </div>
            <button type="button" class="btn-close" data-bs-dismiss="alert"></button>
        </div>
    <?php endif; ?>

    <div class="row g-4" x-data="kycManager()">
        <!-- Main Content -->
        <div class="col-lg-8">
            <div class="card border-0 shadow-sm tw-rounded-2xl">
                <div class="card-body p-4">
                    <form action="<?php echo e(route('seller.kyc.update')); ?>" method="POST" enctype="multipart/form-data">
                        <?php echo csrf_field(); ?>
                        
                        <!-- Info Alert -->
                        <div class="alert tw-bg-orange-50 tw-text-orange-800 tw-border-0 tw-rounded-xl mb-4 d-flex align-items-center">
                            <i class="bi bi-shield-exclamation fs-4 me-3"></i>
                            <div>
                                <strong>Required:</strong> PAN Number, PAN Card, and Your Photo are <strong>mandatory</strong> for KYC verification.
                            </div>
                        </div>

                        <!-- MANDATORY SECTION -->
                        <div class="tw-border-2 tw-border-orange-200 tw-rounded-xl tw-p-5 tw-bg-orange-50 tw-mb-6">
                            <h6 class="tw-font-bold tw-text-gray-800 tw-mb-4 tw-flex tw-items-center">
                                <i class="bi bi-shield-check tw-text-orange-600 me-2"></i>
                                Required for Verification
                                <span class="badge bg-danger ms-2 small">Mandatory</span>
                            </h6>
                            
                            <div class="row g-4">
                                <!-- Seller Photo -->
                                <div class="col-md-4">
                                    <label class="form-label tw-font-bold tw-text-sm tw-text-gray-600">Your Photo <span class="text-danger">*</span></label>
                                    <div class="tw-relative tw-border-2 tw-border-dashed tw-border-gray-300 tw-rounded-xl tw-aspect-square tw-flex tw-items-center tw-justify-center hover:tw-border-orange-400 tw-transition-colors tw-bg-white tw-overflow-hidden"
                                         @click="$refs.sellerPhotoInput.click()" style="cursor: pointer;">
                                        <template x-if="sellerPhotoPreview">
                                            <img :src="sellerPhotoPreview" class="tw-w-full tw-h-full tw-object-cover">
                                        </template>
                                        <template x-if="!sellerPhotoPreview">
                                            <div class="text-center tw-p-3">
                                                <?php if($seller->photo): ?>
                                                    <img src="<?php echo e(asset('storage/' . $seller->photo)); ?>" class="tw-w-full tw-h-full tw-object-cover tw-absolute tw-inset-0">
                                                    <div class="tw-relative tw-z-10 bg-white bg-opacity-75 tw-p-1 tw-rounded">
                                                        <i class="bi bi-camera-fill tw-text-green-600"></i>
                                                        <p class="tw-text-xs tw-text-green-700 tw-font-bold mb-0">Change Photo</p>
                                                    </div>
                                                <?php else: ?>
                                                    <i class="bi bi-person-bounding-box tw-text-4xl tw-text-gray-400"></i>
                                                    <p class="tw-text-xs tw-text-gray-500 tw-mb-0 tw-mt-2">Click to upload</p>
                                                    <p class="tw-text-xs tw-text-orange-600 tw-font-bold">Required</p>
                                                <?php endif; ?>
                                            </div>
                                        </template>
                                        <input type="file" name="seller_photo" class="d-none" x-ref="sellerPhotoInput" accept="image/*" @change="previewSellerPhoto($event)">
                                    </div>
                                    <small class="text-muted">Clear face photo for KYC</small>
                                </div>
                                
                                <!-- PAN Details -->
                                <div class="col-md-8">
                                    <div class="row g-3">
                                        <div class="col-12">
                                            <label class="form-label tw-font-bold tw-text-sm tw-text-gray-600">PAN Number <span class="text-danger">*</span></label>
                                            <input type="text" class="form-control form-control-lg tw-bg-white <?php $__errorArgs = ['pan_number'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>" 
                                                   name="pan_number" placeholder="ABCDE1234F" value="<?php echo e(old('pan_number', $seller->pan_number)); ?>" 
                                                   maxlength="10" style="text-transform: uppercase;" pattern="[A-Z]{5}[0-9]{4}[A-Z]{1}">
                                            <small class="text-muted">Format: 5 letters + 4 digits + 1 letter (e.g., ABCDE1234F)</small>
                                        </div>
                                        <div class="col-12">
                                            <label class="form-label tw-font-bold tw-text-sm tw-text-gray-600">PAN Card Image <span class="text-danger">*</span></label>
                                            <div class="tw-relative tw-border-2 tw-border-dashed tw-border-gray-300 tw-rounded-xl tw-p-4 hover:tw-border-orange-400 tw-transition-colors tw-bg-white"
                                                 @click="$refs.panCardInput.click()" style="cursor: pointer;">
                                                <template x-if="panCardPreview">
                                                    <div class="d-flex align-items-center gap-3">
                                                        <template x-if="panCardPreview !== 'pdf'">
                                                            <img :src="panCardPreview" class="tw-w-20 tw-h-14 tw-object-cover tw-rounded tw-border">
                                                        </template>
                                                        <template x-if="panCardPreview === 'pdf'">
                                                            <div class="tw-w-14 tw-h-14 tw-bg-red-100 tw-rounded tw-flex tw-items-center tw-justify-center">
                                                                <i class="bi bi-file-earmark-pdf tw-text-xl tw-text-red-600"></i>
                                                            </div>
                                                        </template>
                                                        <div class="flex-grow-1">
                                                            <p class="mb-0 tw-font-bold tw-text-green-700"><i class="bi bi-check-circle-fill me-1"></i>PAN Selected</p>
                                                            <small class="text-muted">Click to change</small>
                                                        </div>
                                                    </div>
                                                </template>
                                                <template x-if="!panCardPreview">
                                                    <div class="d-flex align-items-center gap-3">
                                                        <?php if($seller->pan_doc): ?>
                                                            <div class="tw-w-14 tw-h-14 tw-bg-green-100 tw-rounded tw-flex tw-items-center tw-justify-center">
                                                                <i class="bi bi-file-earmark-check tw-text-2xl tw-text-green-600"></i>
                                                            </div>
                                                            <div>
                                                                <p class="mb-0 tw-font-bold tw-text-green-700">PAN Card Uploaded</p>
                                                                <small class="text-muted">Click to replace</small>
                                                            </div>
                                                        <?php else: ?>
                                                            <div class="tw-w-14 tw-h-14 tw-bg-gray-100 tw-rounded tw-flex tw-items-center tw-justify-center">
                                                                <i class="bi bi-credit-card-2-front tw-text-2xl tw-text-gray-400"></i>
                                                            </div>
                                                            <div>
                                                                <p class="mb-0 tw-text-sm"><span class="tw-text-orange-600 tw-font-bold">Upload PAN Card</span> (front side)</p>
                                                                <small class="text-muted">JPG, PNG or PDF (Max 5MB)</small>
                                                            </div>
                                                        <?php endif; ?>
                                                    </div>
                                                </template>
                                                <input type="file" name="pan_card_doc" class="d-none" x-ref="panCardInput" accept=".jpg,.jpeg,.png,.pdf" @change="previewPanCard($event)">
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>

                        <!-- OPTIONAL SECTION (MATCHING REGISTRATION) -->
                        <div class="tw-border tw-border-gray-200 tw-rounded-xl tw-p-5 tw-bg-gray-50 tw-mb-4">
                            <h6 class="tw-font-bold tw-text-gray-700 tw-mb-4 tw-flex tw-items-center">
                                <i class="bi bi-file-earmark-text tw-text-gray-500 me-2"></i>
                                Additional Documents
                            </h6>
                            
                            <div class="row g-4">
                                <div class="col-md-6">
                                    <label class="form-label tw-font-bold tw-text-sm tw-text-gray-600">GST Number</label>
                                    <div class="input-group">
                                        <input type="text" class="form-control form-control-lg tw-bg-white" name="gst_number" 
                                               placeholder="22AAAAA0000A1Z5" value="<?php echo e(old('gst_number', $seller->gst)); ?>" 
                                               maxlength="15" style="text-transform: uppercase;" x-model="gstNumber">
                                        <button class="btn btn-outline-secondary" type="button" @click="$refs.gstDocInput.click()">
                                            <i class="bi bi-file-earmark-arrow-up"></i>
                                        </button>
                                    </div>
                                    <input type="file" name="gst_doc" class="d-none" x-ref="gstDocInput" @change="previewGstDoc($event)" accept=".pdf,.jpg,.png,.jpeg">
                                    <div x-show="gstDocPreview" class="mt-2 tw-text-xs tw-text-green-600 d-flex align-items-center gap-1">
                                        <i class="bi bi-check-circle-fill"></i> GST Certificate Selected
                                    </div>
                                    <small class="text-muted">15 character GSTIN</small>
                                </div>
                                <div class="col-md-6">
                                    <label class="form-label tw-font-bold tw-text-sm tw-text-gray-600">Udyam Registration No.</label>
                                    <input type="text" class="form-control form-control-lg tw-bg-white" name="udyam_number" 
                                           placeholder="UDYAM-XX-00-0000000" value="<?php echo e(old('udyam_number', $seller->udyam_number)); ?>" 
                                           style="text-transform: uppercase;" x-model="udyamNumber">
                                    <small class="text-muted">For MSME registered businesses</small>
                                </div>
                                <div class="col-md-6">
                                    <label class="form-label tw-font-bold tw-text-sm tw-text-gray-600">IEC Code <span class="text-muted fw-normal">(for exporters)</span></label>
                                    <div class="input-group">
                                        <input type="text" class="form-control form-control-lg tw-bg-white" name="iec_code" 
                                               placeholder="0123456789" value="<?php echo e(old('iec_code', $seller->iec_code)); ?>" 
                                               maxlength="10" x-model="iecCode">
                                        <button class="btn btn-outline-secondary" type="button" @click="$refs.iecDocInput.click()">
                                            <i class="bi bi-file-earmark-arrow-up"></i>
                                        </button>
                                    </div>
                                    <input type="file" name="iec_doc" class="d-none" x-ref="iecDocInput" @change="previewIecDoc($event)" accept=".pdf,.jpg,.png,.jpeg">
                                    <div x-show="iecDocPreview" class="mt-2 tw-text-xs tw-text-green-600 d-flex align-items-center gap-1">
                                        <i class="bi bi-check-circle-fill"></i> IEC Certificate Selected
                                    </div>
                                    <small class="text-muted">Import Export Code</small>
                                </div>
                            </div>
                        </div>

                        <!-- Multi-file Upload -->
                        <div class="col-12 mt-4">
                            <label class="form-label tw-font-bold tw-text-gray-700">Upload Documents</label>
                            
                            <template x-for="(doc, index) in kycDocuments" :key="index">
                                <div class="tw-border tw-border-green-400 tw-rounded-lg tw-p-3 tw-bg-green-50 mb-2">
                                    <div class="d-flex align-items-center gap-3">
                                        <div class="tw-flex-shrink-0">
                                            <template x-if="doc.type === 'image'">
                                                <img :src="doc.preview" class="tw-w-12 tw-h-12 tw-object-cover tw-rounded tw-border">
                                            </template>
                                            <template x-if="doc.type === 'pdf'">
                                                <div class="tw-w-12 tw-h-12 tw-bg-red-100 tw-rounded tw-flex tw-items-center tw-justify-center">
                                                    <i class="bi bi-file-earmark-pdf tw-text-xl tw-text-red-600"></i>
                                                </div>
                                            </template>
                                        </div>
                                        <div class="flex-grow-1">
                                            <p class="mb-0 fw-medium tw-text-green-800" x-text="doc.name"></p>
                                            <small class="tw-text-green-600" x-text="doc.size"></small>
                                        </div>
                                        <button type="button" class="btn btn-sm btn-outline-danger border-0" @click="removeKycDoc(index)">
                                            <i class="bi bi-x-lg"></i>
                                        </button>
                                    </div>
                                </div>
                            </template>
                            
                            <div class="tw-relative tw-border-2 tw-border-dashed tw-border-gray-300 tw-rounded-xl tw-p-5 text-center hover:tw-border-orange-400 tw-transition-colors tw-bg-light"
                                 @click="$refs.kycDocsInput.click()" style="cursor: pointer;">
                                <i class="bi bi-cloud-upload tw-text-3xl tw-text-gray-400 mb-2"></i>
                                <p class="mb-1 tw-text-sm tw-text-gray-600">
                                    <span x-show="kycDocuments.length === 0">Drop files or <span class="tw-text-orange-600 tw-font-bold">browse</span></span>
                                    <span x-show="kycDocuments.length > 0" class="tw-text-orange-600 tw-font-bold">+ Add more</span>
                                </p>
                                <span class="d-block tw-text-xs tw-text-gray-400">JPEG, PNG, PDF (Max 5MB)</span>
                                <input type="file" name="kyc_documents[]" class="d-none" x-ref="kycDocsInput" accept=".jpg,.jpeg,.png,.pdf" @change="addKycDoc($event)" multiple>
                            </div>
                        </div>

                        <!-- Declaration -->
                        <div class="col-12 mt-4">
                            <div class="tw-bg-gray-50 tw-border tw-border-gray-200 tw-rounded-xl tw-p-4">
                                <div class="form-check">
                                    <input class="form-check-input tw-scale-125" type="checkbox" id="declaration" name="declaration" required>
                                    <label class="form-check-label tw-text-sm tw-text-gray-600 ms-2" for="declaration">
                                        I declare that the information provided is true and correct. I agree to the <a href="<?php echo e(route('public.terms')); ?>" target="_blank" class="tw-text-orange-600 tw-font-bold">Terms & Conditions</a>.
                                    </label>
                                </div>
                            </div>
                        </div>

                        <div class="mt-4 text-end">
                            <button type="submit" class="btn btn-warning px-5 py-3 fw-bold text-dark rounded-pill shadow-lg tw-transition hover:tw-scale-105 active:tw-scale-95">
                                <i class="bi bi-shield-check me-2"></i> Update KYC Documents
                            </button>
                        </div>
                    </form>
                </div>
            </div>
        </div>

        <!-- Sidebar -->
        <div class="col-lg-4">
            <!-- Uploaded Documents List -->
            <div class="card border-0 shadow-sm mb-4 tw-rounded-2xl overflow-hidden">
                <div class="card-header bg-white py-3 d-flex justify-content-between align-items-center">
                    <h6 class="fw-bold mb-0 text-dark">Uploaded Files</h6>
                    <span class="badge bg-primary bg-opacity-10 text-primary rounded-pill"><?php echo e($documents->count()); ?></span>
                </div>
                <div class="card-body p-0">
                    <div class="list-group list-group-flush">
                        <?php $__empty_1 = true; $__currentLoopData = $documents; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $doc): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                            <div class="list-group-item px-4 py-3 border-light">
                                <div class="d-flex align-items-center gap-3">
                                    <?php if(Str::endsWith($doc->file_path, '.pdf')): ?>
                                        <div class="tw-w-10 tw-h-10 tw-bg-red-50 tw-rounded-lg tw-flex tw-items-center tw-justify-center">
                                            <i class="bi bi-file-earmark-pdf tw-text-red-500"></i>
                                        </div>
                                    <?php else: ?>
                                        <div class="tw-relative">
                                            <img src="<?php echo e(asset('storage/' . $doc->file_path)); ?>" class="tw-w-10 tw-h-10 tw-object-cover tw-rounded-lg tw-border">
                                        </div>
                                    <?php endif; ?>
                                    <div class="flex-grow-1">
                                        <p class="mb-0 tw-text-sm tw-font-bold text-dark"><?php echo e(ucfirst($doc->document_type)); ?></p>
                                        <div class="d-flex align-items-center gap-2">
                                            <span class="badge <?php echo e($doc->status === 'approved' ? 'bg-success' : ($doc->status === 'rejected' ? 'bg-danger' : 'bg-warning text-dark')); ?> bg-opacity-10 <?php echo e($doc->status === 'approved' ? 'text-success' : ($doc->status === 'rejected' ? 'text-danger' : 'text-warning-emphasis')); ?> tw-text-[9px] tw-font-bold px-2">
                                                <?php echo e(strtoupper($doc->status)); ?>

                                            </span>
                                            <small class="text-muted tw-text-[10px]"><?php echo e($doc->created_at->format('M d')); ?></small>
                                        </div>
                                    </div>
                                    
                                    <div class="ms-auto">
                                        <form action="<?php echo e(route('seller.kyc.document.destroy', $doc->id)); ?>" method="POST" onsubmit="return confirm('Are you sure you want to remove this document? This may affect your verification status.')">
                                            <?php echo csrf_field(); ?>
                                            <?php echo method_field('DELETE'); ?>
                                            <button type="submit" class="btn btn-sm btn-outline-danger border-0 p-1" title="Remove Document">
                                                <i class="bi bi-trash3"></i>
                                            </button>
                                        </form>
                                    </div>
                                </div>
                                <?php if($doc->rejection_reason && $doc->status === 'rejected'): ?>
                                    <div class="mt-2 tw-bg-red-50 tw-text-red-700 tw-text-[10px] tw-p-2 tw-rounded-lg">
                                        <strong>Reason:</strong> <?php echo e($doc->rejection_reason); ?>

                                    </div>
                                <?php endif; ?>
                            </div>
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                            <div class="p-4 text-center text-muted small">
                                <i class="bi bi-folder-x fs-2 d-block mb-2 opacity-50"></i>
                                No documents uploaded yet
                            </div>
                        <?php endif; ?>
                    </div>
                </div>
            </div>

            <!-- Benefits Card -->
            <div class="card border-0 shadow-sm mb-4 tw-rounded-2xl" style="background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);">
                <div class="card-body p-4 text-white">
                    <h5 class="fw-bold mb-4"><i class="bi bi-star-fill me-2"></i>Verification Benefits</h5>
                    <div class="d-flex gap-3 mb-3">
                        <div class="tw-w-8 tw-h-8 tw-bg-white tw-bg-opacity-20 tw-rounded-lg tw-flex tw-items-center tw-justify-center tw-shrink-0">
                            <i class="bi bi-patch-check-fill tw-text-white"></i>
                        </div>
                        <p class="tw-text-sm mb-0"><strong>Trust Badge:</strong> Verified sellers get 3x more inquiries.</p>
                    </div>
                    <div class="d-flex gap-3 mb-3">
                        <div class="tw-w-8 tw-h-8 tw-bg-white tw-bg-opacity-20 tw-rounded-lg tw-flex tw-items-center tw-justify-center tw-shrink-0">
                            <i class="bi bi-graph-up tw-text-white"></i>
                        </div>
                        <p class="tw-text-sm mb-0"><strong>Higher Ranking:</strong> Verified businesses appear first.</p>
                    </div>
                    <div class="d-flex gap-3">
                        <div class="tw-w-8 tw-h-8 tw-bg-white tw-bg-opacity-20 tw-rounded-lg tw-flex tw-items-center tw-justify-center tw-shrink-0">
                            <i class="bi bi-shield-lock tw-text-white"></i>
                        </div>
                        <p class="tw-text-sm mb-0"><strong>Buyer Security:</strong> Trusted and safe trade environment.</p>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<?php $__env->stopSection(); ?>

<?php $__env->startPush('scripts'); ?>
<script>
    function kycManager() {
        return {
            sellerPhotoPreview: null,
            panCardPreview: null,
            kycDocuments: [],
            gstNumber: '<?php echo e(old('gst_number', $seller->gst)); ?>',
            udyamNumber: '<?php echo e(old('udyam_number', $seller->udyam_number)); ?>',
            iecCode: '<?php echo e(old('iec_code', $seller->iec_code)); ?>',
            gstDocPreview: false,
            iecDocPreview: false,
            
            previewGstDoc(event) {
                if (event.target.files.length > 0) this.gstDocPreview = true;
            },
            
            previewIecDoc(event) {
                if (event.target.files.length > 0) this.iecDocPreview = true;
            },
            
            previewSellerPhoto(event) {
                const file = event.target.files[0];
                if (file) {
                    const reader = new FileReader();
                    reader.onload = (e) => {
                        this.sellerPhotoPreview = e.target.result;
                    };
                    reader.readAsDataURL(file);
                }
            },
            
            previewPanCard(event) {
                const file = event.target.files[0];
                if (file) {
                    if (file.type === 'application/pdf') {
                        this.panCardPreview = 'pdf';
                    } else {
                        const reader = new FileReader();
                        reader.onload = (e) => {
                            this.panCardPreview = e.target.result;
                        };
                        reader.readAsDataURL(file);
                    }
                }
            },

            addKycDoc(event) {
                const files = event.target.files;
                if (!files.length) return;

                // Use DataTransfer to accumulate files
                if (!this.dt) this.dt = new DataTransfer();
                
                for (let i = 0; i < files.length; i++) {
                    const file = files[i];
                    this.dt.items.add(file);
                    
                    const sizeKB = (file.size / 1024).toFixed(1);
                    const sizeStr = sizeKB > 1024 ? (sizeKB / 1024).toFixed(1) + ' MB' : sizeKB + ' KB';
                    const isPdf = file.type === 'application/pdf';
                    
                    const docObj = {
                        name: file.name,
                        size: sizeStr,
                        type: isPdf ? 'pdf' : 'image',
                        preview: ''
                    };
                    
                    if (!isPdf) {
                        const reader = new FileReader();
                        const idx = this.kycDocuments.length;
                        reader.onload = (e) => {
                            this.kycDocuments[idx].preview = e.target.result;
                        };
                        reader.readAsDataURL(file);
                    }
                    this.kycDocuments.push(docObj);
                }
                
                // Sync with the actual file input
                this.$refs.kycDocsInput.files = this.dt.files;
            },
            
            removeKycDoc(index) {
                this.kycDocuments.splice(index, 1);
                
                // Also remove from DataTransfer
                const newDt = new DataTransfer();
                const files = this.dt.files;
                for (let i = 0; i < files.length; i++) {
                    if (i !== index) newDt.items.add(files[i]);
                }
                this.dt = newDt;
                this.$refs.kycDocsInput.files = this.dt.files;
            }
        }
    }
</script>
<?php $__env->stopPush(); ?>

<?php echo $__env->make('layouts.seller', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/u281583269/domains/theminiport.com/public_html/resources/views/seller/verification/index.blade.php ENDPATH**/ ?>