<?php $__env->startSection('tab-content'); ?>
<?php
    $jsonArray = json_encode($credentials);
    $customApiTranslationsJson = json_encode($customApiTranslations);
?>

<div class="tab-pane active fade show" id="<?php echo e(url()->current()); ?>" role="tabpanel">
    <div class="table-filter mb-4">
        <form action="<?php echo e(route(Route::currentRouteName())); ?>" class="filter-form">
            <div class="row g-3">
                <div class="col-xxl-3 col-xl-4 col-lg-4">
                    <div class="filter-search">
                        <input type="search" value="<?php echo e(request()->search); ?>" name="search" class="form-control" id="filter-search" placeholder="<?php echo e(translate('Search by name')); ?>" />
                        <span><i class="ri-search-line"></i></span>
                    </div>
                </div>
                <div class="col-xxl-5 col-xl-6 col-lg-7 offset-xxl-4 offset-xl-2">
                    <div class="filter-action">
                        <div class="input-group">
                            <input type="text" class="form-control" id="datePicker" name="date" value="<?php echo e(request()->input('date')); ?>" placeholder="<?php echo e(translate('Filter by date')); ?>" aria-describedby="filterByDate">
                            <span class="input-group-text" id="filterByDate">
                                <i class="ri-calendar-2-line"></i>
                            </span>
                        </div>
                        <div class="d-flex align-items-center gap-3">
                            <button type="submit" class="filter-action-btn">
                                <i class="ri-menu-search-line"></i> <?php echo e(translate("Filter")); ?>

                            </button>
                            <a class="filter-action-btn bg-danger text-white" href="<?php echo e(route(Route::currentRouteName())); ?>">
                                <i class="ri-refresh-line"></i> <?php echo e(translate("Reset")); ?>

                            </a>
                        </div>
                    </div>
                </div>
            </div>
        </form>
    </div>
    <div class="card">
        <div class="card-header">
            <div class="card-header-left">
                <h4 class="card-title"><?php echo e(translate("Contacts")); ?></h4>
            </div>
            <div class="card-header-right">
                <div class="d-flex gap-3 align-item-center">
                    <button class="bulk-action i-btn btn--danger btn--sm bulk-delete-btn d-none">
                        <i class="ri-delete-bin-6-line"></i>
                    </button>
                    <div class="bulk-action form-inner d-none">
                        <select class="form-select" data-show="5" id="bulk_status" name="status">
                            <option disabled selected><?php echo e(translate("Select a status")); ?></option>
                            <option value="<?php echo e(\App\Enums\Common\Status::ACTIVE->value); ?>"><?php echo e(translate("Active")); ?></option>
                            <option value="<?php echo e(\App\Enums\Common\Status::INACTIVE->value); ?>"><?php echo e(translate("Inactive")); ?></option>
                        </select>
                    </div>
                    <button class="i-btn btn--primary btn--sm add-sms-gateway" type="button" data-bs-toggle="modal" data-bs-target="#addSmsGateway">
                        <i class="ri-add-fill fs-16"></i> <?php echo e(translate("Add Gateway")); ?>

                    </button>
                </div>
            </div>
        </div>
        <div class="card-body px-0 pt-0">
            <div class="table-container">
                <table>
                    <thead>
                        <tr>
                            <th scope="col">
                                <div class="form-check">
                                    <input class="check-all form-check-input" type="checkbox" value="" id="checkAll" />
                                    <label class="form-check-label" for="checkedAll"> <?php echo e(translate("SL No.")); ?> </label>
                                </div>
                            </th>
                            <th scope="col"><?php echo e(translate("Gateway Name")); ?></th>
                            <th scope="col"><?php echo e(translate("Gateway Type")); ?></th>
                            <th scope="col"><?php echo e(translate("Default")); ?></th>
                            <th scope="col"><?php echo e(translate("Status")); ?></th>
                            <th scope="col"><?php echo e(translate("Option")); ?></th>
                        </tr>
                    </thead>
                    <tbody>
                        <?php $__empty_1 = true; $__currentLoopData = $gateways; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $sms_gateway): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                            <?php
                                $driver_info = json_encode($sms_gateway->meta_data);
                            ?>
                            <tr class="<?php if($loop->even): ?><?php endif; ?>">
                                <td>
                                    <div class="form-check">
                                        <input type="checkbox" value="<?php echo e($sms_gateway->id); ?>" name="ids[]" class="data-checkbox form-check-input" id="<?php echo e($sms_gateway->id); ?>" />
                                        <label class="form-check-label fw-semibold text-dark" for="bulk-<?php echo e($loop->iteration); ?>"><?php echo e($loop->iteration); ?></label>
                                    </div>
                                </td>
                                <td data-label="<?php echo e(translate('Gateway Name')); ?>"><span class="text-dark"><?php echo e(ucfirst($sms_gateway->name)); ?></span></td>
                                <td data-label="<?php echo e(translate('Gateway Type')); ?>"><span class="text-dark"><?php echo e(preg_replace('/[[:digit:]]/','', setInputLabel($sms_gateway->type))); ?></span></td>
                                <td data-label="<?php echo e(translate('Default')); ?>">
                                    <?php if($sms_gateway->is_default == \App\Enums\StatusEnum::TRUE->status()): ?>
                                        <div class="d-flex align-items-center gap-2">
                                            <span class="i-badge dot success-soft pill"><?php echo e(translate("Default")); ?></span>
                                        </div>
                                    <?php else: ?>
                                        <div class="switch-wrapper checkbox-data">
                                            <input <?php echo e($sms_gateway->is_default == App\Enums\StatusEnum::TRUE->status() ? 'checked' : ''); ?>

                                                type="checkbox"
                                                class="switch-input statusUpdate"
                                                data-id="<?php echo e($sms_gateway->id); ?>"
                                                data-column="is_default"
                                                data-value="<?php echo e($sms_gateway->is_default ? 0 : 1); ?>"
                                                data-route="<?php echo e(route('admin.gateway.sms.api.status.update')); ?>"
                                                id="<?php echo e('default_'.$sms_gateway->id); ?>"
                                                name="is_default"/>
                                            <label for="<?php echo e('default_'.$sms_gateway->id); ?>" class="toggle">
                                                <span></span>
                                            </label>
                                        </div>
                                    <?php endif; ?>
                                </td>
                                <td data-label="<?php echo e(translate('Status')); ?>">
                                    <div class="switch-wrapper checkbox-data">
                                        <input <?php echo e(empty($sms_gateway->getRawOriginal('status')) 
                                                    || $sms_gateway->getRawOriginal('status') == '' 
                                                        ? '' 
                                                        : ($sms_gateway->getRawOriginal('status') == \App\Enums\Common\Status::ACTIVE->value ? 'checked' : '')); ?>

                                                type="checkbox"
                                                class="switch-input statusUpdate"
                                                data-id="<?php echo e($sms_gateway->id); ?>"
                                                data-column="status"
                                                data-value="<?php echo e(empty($sms_gateway->getRawOriginal('status')) || $sms_gateway->getRawOriginal('status') == '' 
                                                            ? \App\Enums\Common\Status::ACTIVE->value 
                                                            : ($sms_gateway->getRawOriginal('status') == \App\Enums\Common\Status::ACTIVE->value 
                                                                ? \App\Enums\Common\Status::INACTIVE->value 
                                                                : \App\Enums\Common\Status::ACTIVE->value)); ?>"
                                                data-route="<?php echo e(route('admin.gateway.sms.api.status.update')); ?>"
                                                id="<?php echo e('status_' . $sms_gateway->id); ?>"
                                                name="is_default"/>
                                        <label for="<?php echo e('status_'.$sms_gateway->id); ?>" class="toggle">
                                            <span></span>
                                        </label>
                                    </div>
                                </td>
                                <td data-label=<?php echo e(translate('Option')); ?>>
                                    <div class="d-flex align-items-center gap-1">
                                        <button class="icon-btn btn-ghost btn-sm success-soft circle update-sms-gateway"
                                            type="button"
                                            data-url="<?php echo e(route('admin.gateway.sms.api.update', ['id' => $sms_gateway->id])); ?>"
                                            data-gateway_type="<?php echo e($sms_gateway?->type); ?>"
                                            data-gateway_name="<?php echo e($sms_gateway?->name); ?>"
                                            data-bulk_contact_limit="<?php echo e($sms_gateway?->bulk_contact_limit); ?>"
                                            data-per_message_min_delay="<?php echo e($sms_gateway?->per_message_min_delay); ?>"
                                            data-per_message_max_delay="<?php echo e($sms_gateway?->per_message_max_delay); ?>"
                                            data-delay_after_count="<?php echo e($sms_gateway?->delay_after_count); ?>"
                                            data-reset_after_count="<?php echo e($sms_gateway?->reset_after_count); ?>"
                                            data-delay_after_duration="<?php echo e($sms_gateway?->delay_after_duration); ?>"
                                            data-meta_data="<?php echo e($driver_info); ?>"
                                            data-bs-toggle="modal"
                                            data-bs-target="#updateSmsGateway">
                                            <i class="ri-edit-line"></i>
                                            <span class="tooltiptext"> <?php echo e(translate("Update")); ?> </span>
                                        </button>
                                        <button class="icon-btn btn-ghost btn-sm info-soft circle text-info quick-view"
                                            type="button"
                                            data-sms_gateways="<?php echo e($driver_info); ?>"
                                            data-id="<?php echo e($sms_gateway->id); ?>"
                                            data-bs-toggle="modal"
                                            data-bs-target="#quick_view">
                                            <i class="ri-information-line"></i>
                                            <span class="tooltiptext"> <?php echo e(translate("Quick View")); ?> </span>
                                        </button>
                                        <button class="icon-btn btn-ghost btn-sm danger-soft circle text-danger delete-sms-gateway"
                                            type="button"
                                            data-url="<?php echo e(route('admin.gateway.sms.api.delete', ['id' => $sms_gateway->id ])); ?>"
                                            data-bs-toggle="modal"
                                            data-bs-target="#deleteSmsGateway">
                                            <i class="ri-delete-bin-line"></i>
                                            <span class="tooltiptext"> <?php echo e(translate("Delete SMS Gateway")); ?> </span>
                                        </button>
                                    </div>
                                </td>
                            </tr>
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                            <tr>
                                <td class="text-muted text-center" colspan="100%"><?php echo e(translate('No Data Found')); ?></td>
                            </tr>
                        <?php endif; ?>
                    </tbody>
                </table>
            </div>
            <?php echo $__env->make('admin.partials.pagination', ['paginator' => $gateways], \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
        </div>
    </div>
</div>
<?php $__env->stopSection(); ?>

<?php $__env->startSection('modal'); ?>
    <div class="modal fade actionModal" id="bulkAction" tabindex="-1" aria-labelledby="bulkAction" aria-hidden="true">
        <div class="modal-dialog modal-dialog-centered">
            <div class="modal-content">
                <div class="modal-header text-start">
                    <span class="action-icon danger">
                        <i class="bi bi-exclamation-circle"></i>
                    </span>
                </div>
                <form action="<?php echo e(route('admin.gateway.sms.api.bulk')); ?>" method="POST" enctype="multipart/form-data">
                    <?php echo csrf_field(); ?>
                    <div class="modal-body">
                        <input type="hidden" name="id" value="">
                        <div class="action-message">
                            <h5><?php echo e(translate("Do you want to proceed?")); ?></h5>
                            <p><?php echo e(translate("This action is irreversable")); ?></p>
                        </div>
                    </div>
                    <div class="modal-footer">
                        <button type="button" class="i-btn btn--dark outline btn--lg" data-bs-dismiss="modal"> <?php echo e(translate("Cancel")); ?> </button>
                        <button type="submit" class="i-btn btn--danger btn--lg" data-bs-dismiss="modal"> <?php echo e(translate("Proceed")); ?> </button>
                    </div>
                </form>
            </div>
        </div>
    </div>

    <div class="modal fade" id="quick_view" tabindex="-1" aria-labelledby="quick_view" aria-hidden="true">
        <div class="modal-dialog modal-md modal-dialog-centered">
            <div class="modal-content">
                <div class="modal-header">
                    <h5 class="modal-title" id="exampleModalLabel"><?php echo e(translate("SMS Gateway Information")); ?></h5>
                    <button type="button" class="icon-btn btn-ghost btn-sm danger-soft circle modal-closer" data-bs-dismiss="modal">
                        <i class="ri-close-line"></i>
                    </button>
                </div>
                <div class="modal-body">
                    <ul class="information-list"></ul>
                </div>
                <div class="modal-footer">
                    <button type="button" class="i-btn btn--danger outline btn--md" data-bs-dismiss="modal"><?php echo e(translate("Close")); ?></button>
                    <button type="button" class="i-btn btn--primary btn--md"><?php echo e(translate("Save")); ?></button>
                </div>
            </div>
        </div>
    </div>

    <div class="modal fade actionModal" id="deleteSmsGateway" tabindex="-1" aria-labelledby="deleteSmsGateway" aria-hidden="true">
        <div class="modal-dialog modal-dialog-centered">
            <div class="modal-content">
                <div class="modal-header text-start">
                    <span class="action-icon danger">
                        <i class="bi bi-exclamation-circle"></i>
                    </span>
                </div>
                <form method="POST" id="deleteSmsGateway">
                    <?php echo csrf_field(); ?>
                    <div class="modal-body">
                        <input type="hidden" name="_method" value="DELETE">
                        <div class="action-message">
                            <h5><?php echo e(translate("Are you sure to delete this sms_gateway?")); ?></h5>
                            <p><?php echo e(translate("By clicking on 'Delete', you will permanently remove the sms_gateway from the application")); ?></p>
                        </div>
                    </div>
                    <div class="modal-footer">
                        <button type="button" class="i-btn btn--dark outline btn--lg" data-bs-dismiss="modal"> <?php echo e(translate("Cancel")); ?> </button>
                        <button type="submit" class="i-btn btn--danger btn--lg" data-bs-dismiss="modal"> <?php echo e(translate("Delete")); ?> </button>
                    </div>
                </form>
            </div>
        </div>
    </div>

    <div class="modal fade modal-select2" id="addSmsGateway" tabindex="-1" aria-labelledby="addSmsGateway" aria-hidden="true">
        <div class="modal-dialog modal-xl modal-dialog-centered">
            <div class="modal-content">
                <form id="add-sms-gateway-form" action="<?php echo e(route('admin.gateway.sms.api.store')); ?>" method="POST">
                    <?php echo csrf_field(); ?>
                    <input type="hidden" name="gateway_mode" id="add_gateway_mode" value="built-in">
                    <input type="hidden" name="is_custom_api" id="add_is_custom_api" value="0">
                    <input type="hidden" name="meta_data" id="add_meta_data_configuration">
                    <div class="modal-header">
                        <h5 class="modal-title" id="exampleModalLabel"><?php echo e(translate("Add SMS Gateway")); ?></h5>
                        <button type="button" class="icon-btn btn-ghost btn-sm danger-soft circle modal-closer" data-bs-dismiss="modal">
                            <i class="ri-close-large-line"></i>
                        </button>
                    </div>
                    <div class="modal-body modal-lg-custom-height">
                        <div class="row g-4">
                            <div class="col-12">
                                <div class="form-inner">
                                    <label for="add_name" class="form-label"><?php echo e(translate("Gateway Name")); ?></label>
                                    <input type="text" id="add_name" name="name" placeholder="<?php echo e(translate("Enter Gateway Name")); ?>" class="form-control" aria-label="name"/>
                                </div>
                            </div>
                            <div class="col-lg-6">
                                <div class="form-inner">
                                    <label for="add_per_message_min_delay" class="form-label"><?php echo e(translate('Per Message Minimum Delay (Seconds)')); ?></label>
                                    <input type="number" min="0" step="0.1" id="add_per_message_min_delay" name="per_message_min_delay" placeholder="<?php echo e(translate('e.g., 0.5 seconds minimum delay per message')); ?>" class="form-control" aria-label="Per Message Minimum Delay" value="<?php echo e(old('per_message_min_delay', $gateway->per_message_min_delay ?? 0)); ?>" />
                                </div>
                            </div>
                            <div class="col-lg-6">
                                <div class="form-inner">
                                    <label for="add_per_message_max_delay" class="form-label"><?php echo e(translate('Per Message Maximum Delay (Seconds)')); ?></label>
                                    <input type="number" min="0" step="0.1" id="add_per_message_max_delay" name="per_message_max_delay" placeholder="<?php echo e(translate('e.g., 0.5 seconds maximum delay per message')); ?>" class="form-control" aria-label="Per Message Maximum Delay" value="<?php echo e(old('per_message_max_delay', $gateway->per_message_max_delay ?? 0)); ?>" />
                                </div>
                            </div>
                            <div class="col-lg-6">
                                <div class="form-inner">
                                    <label for="add_delay_after_count" class="form-label"><?php echo e(translate('Delay After Count')); ?></label>
                                    <input type="number" min="0" step="1" id="add_delay_after_count" name="delay_after_count" placeholder="<?php echo e(translate('e.g., pause after 50 messages')); ?>" class="form-control" aria-label="Delay After Count" value="<?php echo e(old('delay_after_count', $gateway->delay_after_count ?? 0)); ?>" />
                                </div>
                            </div>
                            <div class="col-lg-6">
                                <div class="form-inner">
                                    <label for="add_delay_after_duration" class="form-label"><?php echo e(translate('Delay After Duration (Seconds)')); ?></label>
                                    <input type="number" min="0" step="0.1" id="add_delay_after_duration" name="delay_after_duration" placeholder="<?php echo e(translate('e.g., pause for 5 seconds')); ?>" class="form-control" aria-label="Delay After Duration" value="<?php echo e(old('delay_after_duration', $gateway->delay_after_duration ?? 0)); ?>" />
                                </div>
                            </div>
                            <div class="col-12">
                                <div class="form-inner">
                                    <label for="add_reset_after_count" class="form-label"><?php echo e(translate('Reset After Count')); ?></label>
                                    <input type="number" min="0" step="1" id="add_reset_after_count" name="reset_after_count" placeholder="<?php echo e(translate('e.g., reset after 200 messages')); ?>" class="form-control" aria-label="Reset After Count" value="<?php echo e(old('reset_after_count', $gateway->reset_after_count ?? 0)); ?>" />
                                </div>
                            </div>
                            <div class="col-12">
                                <div class="gw-tabs-container">
                                    <div class="gw-tabs">
                                        <button type="button" class="gw-tab" id="add-built-in-tab" data-tab="add-built-in"><?php echo e(translate("Built-in API")); ?></button>
                                        <button type="button" class="gw-tab active" id="add-custom-tab" data-tab="add-custom"><?php echo e(translate("Custom API")); ?></button>
                                    </div>
                                    <div class="gw-tab-content">
                                        <div class="gw-tab-pane" id="add-built-in">
                                            <div class="row g-4 mt-1">
                                                <div class="col-lg-12">
                                                    <div class="form-inner">
                                                        <label for="add_gateway_type" class="form-label"><?php echo e(translate("Gateway Type")); ?></label>
                                                        <select data-placeholder="Select a gateway type" class="form-select gateway_type" data-show="5" id="add_gateway_type" name="type">
                                                            <option value="" disabled selected><?php echo e(translate("Select a Gateway")); ?></option>
                                                            <?php $__currentLoopData = $credentials; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $name => $credential): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                                <option value="<?php echo e($name); ?>"><?php echo e(textFormat(['_'], $name, ' ')); ?></option>
                                                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                                        </select>
                                                    </div>
                                                </div>
                                                <div class="col-12">
                                                    <div class="row newdataadd"></div>
                                                </div>
                                                <div class="col-12">
                                                    <div class="info-note">
                                                        <i class="ri-information-line"></i>
                                                        <span><?php echo e(translate("Hitting save while this tab on will save Built-in gateway data")); ?></span>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="gw-tab-pane active" id="add-custom">
                                            <div id="add-custom-api-content"></div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="modal-footer">
                        <button type="button" class="i-btn btn--danger outline btn--md" data-bs-dismiss="modal">
                            <?php echo e(translate("Close")); ?>

                        </button>
                        <button type="submit" class="i-btn btn--primary btn--md">
                            <?php echo e(translate("Save")); ?>

                        </button>
                    </div>
                </form>
            </div>
        </div>
    </div>

    <div class="modal fade modal-select2" id="updateSmsGateway" tabindex="-1" aria-labelledby="updateSmsGateway" aria-hidden="true">
        <div class="modal-dialog modal-xl modal-dialog-centered">
            <div class="modal-content">
                <form id="update-sms-gateway-form" action="" method="POST">
                    <?php echo csrf_field(); ?>
                    <?php echo method_field('PATCH'); ?>
                    <input type="hidden" name="gateway_mode" id="update_gateway_mode" value="built-in">
                    <input type="hidden" name="is_custom_api" id="update_is_custom_api" value="0">
                    <input type="hidden" name="meta_data" id="update_meta_data_configuration">
                    <div class="modal-header">
                        <h5 class="modal-title" id="exampleModalLabel"><?php echo e(translate("Update SMS Gateway")); ?></h5>
                        <button type="button" class="icon-btn btn-ghost btn-sm danger-soft circle modal-closer" data-bs-dismiss="modal">
                            <i class="ri-close-large-line"></i>
                        </button>
                    </div>
                    <div class="modal-body modal-lg-custom-height">
                        <div class="row g-4">
                            <div class="col-12">
                                <div class="form-inner">
                                    <label for="update_name" class="form-label"><?php echo e(translate("Gateway Name")); ?></label>
                                    <input type="text" id="update_name" name="name" placeholder="<?php echo e(translate("Enter Gateway Name")); ?>" class="form-control" aria-label="name"/>
                                </div>
                            </div>
                            <div class="col-lg-6">
                                <div class="form-inner">
                                    <label for="update_per_message_min_delay" class="form-label"><?php echo e(translate('Per Message Minimum Delay (Seconds)')); ?></label>
                                    <input type="number" min="0" step="0.1" id="update_per_message_min_delay" name="per_message_min_delay" placeholder="<?php echo e(translate('e.g., 0.5 seconds minimum delay per message')); ?>" class="form-control" aria-label="Per Message Minimum Delay"/>
                                </div>
                            </div>
                            <div class="col-lg-6">
                                <div class="form-inner">
                                    <label for="update_per_message_max_delay" class="form-label"><?php echo e(translate('Per Message Maximum Delay (Seconds)')); ?></label>
                                    <input type="number" min="0" step="0.1" id="update_per_message_max_delay" name="per_message_max_delay" placeholder="<?php echo e(translate('e.g., 0.5 seconds maximum delay per message')); ?>" class="form-control" aria-label="Per Message Maximum Delay"/>
                                </div>
                            </div>
                            <div class="col-lg-6">
                                <div class="form-inner">
                                    <label for="update_delay_after_count" class="form-label"><?php echo e(translate('Delay After Count')); ?></label>
                                    <input type="number" min="0" step="1" id="update_delay_after_count" name="delay_after_count" placeholder="<?php echo e(translate('e.g., pause after 50 messages')); ?>" class="form-control" aria-label="Delay After Count"/>
                                </div>
                            </div>
                            <div class="col-lg-6">
                                <div class="form-inner">
                                    <label for="update_delay_after_duration" class="form-label"><?php echo e(translate('Delay After Duration (Seconds)')); ?></label>
                                    <input type="number" min="0" step="0.1" id="update_delay_after_duration" name="delay_after_duration" placeholder="<?php echo e(translate('e.g., pause for 5 seconds')); ?>" class="form-control" aria-label="Delay After Duration"/>
                                </div>
                            </div>
                            <div class="col-12">
                                <div class="form-inner">
                                    <label for="update_reset_after_count" class="form-label"><?php echo e(translate('Reset After Count')); ?></label>
                                    <input type="number" min="0" step="1" id="update_reset_after_count" name="reset_after_count" placeholder="<?php echo e(translate('e.g., reset after 200 messages')); ?>" class="form-control" aria-label="Reset After Count"/>
                                </div>
                            </div>
                            <div class="col-12">
                                <div class="gw-tabs-container">
                                    <div class="gw-tabs">
                                        <button type="button" class="gw-tab" id="update-built-in-tab" data-tab="update-built-in"><?php echo e(translate("Built-in API")); ?></button>
                                        <button type="button" class="gw-tab" id="update-custom-tab" data-tab="update-custom"><?php echo e(translate("Custom API")); ?></button>
                                    </div>
                                    <div class="gw-tab-content">
                                        <div class="gw-tab-pane" id="update-built-in">
                                            <div class="row g-4 mt-1">
                                                <div class="col-lg-12">
                                                    <div class="form-inner">
                                                        <label for="update_gateway_type" class="form-label"><?php echo e(translate("Gateway Type")); ?></label>
                                                        <select data-placeholder="Select a gateway type" class="form-select gateway_type" data-show="5" id="update_gateway_type" name="type">
                                                            <option value="" disabled><?php echo e(translate("Select a Gateway")); ?></option>
                                                            <?php $__currentLoopData = $credentials; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $name => $credential): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                                <option value="<?php echo e($name); ?>"><?php echo e(textFormat(['_'], $name, ' ')); ?></option>
                                                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                                        </select>
                                                    </div>
                                                </div>
                                                <div class="col-12">
                                                    <div class="row oldData"></div>
                                                </div>
                                                <div class="col-12 newdataadd"></div>
                                                <div class="col-12">
                                                    <div class="info-note">
                                                        <i class="ri-information-line"></i>
                                                        <span><?php echo e(translate("Hitting save while this tab on will save Built-in gateway data")); ?></span>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="gw-tab-pane" id="update-custom">
                                            <div id="update-custom-api-content"></div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="modal-footer">
                            <button type="button" class="i-btn btn--danger outline btn--md" data-bs-dismiss="modal">
                                <?php echo e(translate("Close")); ?>

                            </button>
                            <button type="submit" class="i-btn btn--primary btn--md">
                                <?php echo e(translate("Update")); ?>

                            </button>
                        </div>
                </form>
            </div>
        </div>
    </div>

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

<?php $__env->startPush('script-push'); ?>

<script>
    window.translations = <?php echo $customApiTranslationsJson; ?>;
    window.credentials  = <?php echo $jsonArray; ?>;
</script>
<?php echo $__env->make("partials.gateway.sms.script", \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
<?php $__env->stopPush(); ?>
<?php echo $__env->make('admin.gateway.index', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH C:\wamp64\www\public\mailing\xsender2026\xsender4.1\src\resources\views/admin/gateway/sms/api/index.blade.php ENDPATH**/ ?>