

<?php $__env->startSection('content'); ?>

<div class="max-w-7xl mx-auto">

<div class="bg-white/10 backdrop-blur-2xl border border-white/10 rounded-2xl shadow-2xl p-8">

<form method="POST" action="<?php echo e(url('/feeder/'.$feeder->id)); ?>" class="grid grid-cols-1 md:grid-cols-3 gap-6">
<?php echo csrf_field(); ?>
<?php echo method_field('PUT'); ?>

<!-- ================= BASIC ================= -->
<h3 class="col-span-3 text-indigo-300">⚡ Basic</h3>

<div class="input-group"><input name="feeder_name" value="<?php echo e($feeder->feeder_name); ?>"><label>Feeder Name</label></div>
<div class="input-group"><input name="feeder_code" value="<?php echo e($feeder->feeder_code); ?>"><label>Feeder Code</label></div>

<div class="input-group">
<select name="feeder_type">
<option <?php echo e($feeder->feeder_type=='Urban'?'selected':''); ?>>Urban</option>
<option <?php echo e($feeder->feeder_type=='Rural'?'selected':''); ?>>Rural</option>
<option <?php echo e($feeder->feeder_type=='Industrial'?'selected':''); ?>>Industrial</option>
</select>
</div>

<div class="input-group">
<select name="voltage_level">
<option <?php echo e($feeder->voltage_level=='11kV'?'selected':''); ?>>11kV</option>
<option <?php echo e($feeder->voltage_level=='33kV'?'selected':''); ?>>33kV</option>
</select>
</div>

<div class="input-group"><input name="substation_name" value="<?php echo e($feeder->substation_name); ?>"><label>Substation</label></div>
<div class="input-group"><input name="substation_code" value="<?php echo e($feeder->substation_code); ?>"><label>Substation Code</label></div>
<div class="input-group"><input name="feeder_length" value="<?php echo e($feeder->feeder_length); ?>"><label>Length</label></div>

<div class="input-group">
<select name="feeder_category">
<option <?php echo e($feeder->feeder_category=='Agriculture'?'selected':''); ?>>Agriculture</option>
<option <?php echo e($feeder->feeder_category=='Mixed'?'selected':''); ?>>Mixed</option>
</select>
</div>

<div class="input-group">
<select name="status">
<option <?php echo e($feeder->status=='Active'?'selected':''); ?>>Active</option>
<option <?php echo e($feeder->status=='Inactive'?'selected':''); ?>>Inactive</option>
</select>
</div>

<!-- ================= LOCATION ================= -->
<h3 class="col-span-3 text-indigo-300">📍 Location</h3>

<div class="input-group"><input name="state" value="<?php echo e($feeder->state); ?>"><label>State</label></div>
<div class="input-group"><input name="district" value="<?php echo e($feeder->district); ?>"><label>District</label></div>
<div class="input-group"><input name="city" value="<?php echo e($feeder->city); ?>"><label>City</label></div>
<div class="input-group"><input name="zone" value="<?php echo e($feeder->zone); ?>"><label>Zone</label></div>
<div class="input-group"><input name="circle" value="<?php echo e($feeder->circle); ?>"><label>Circle</label></div>
<div class="input-group"><input name="division" value="<?php echo e($feeder->division); ?>"><label>Division</label></div>
<div class="input-group"><input name="subdivision" value="<?php echo e($feeder->subdivision); ?>"><label>Subdivision</label></div>
<div class="input-group"><input name="latitude" value="<?php echo e($feeder->latitude); ?>"><label>Latitude</label></div>
<div class="input-group"><input name="longitude" value="<?php echo e($feeder->longitude); ?>"><label>Longitude</label></div>

<!-- ================= DISCOM ================= -->
<h3 class="col-span-3 text-indigo-300">🏢 DISCOM</h3>

<div class="input-group">
<select name="discom_name">
<option <?php echo e($feeder->discom_name=='JVVNL'?'selected':''); ?>>JVVNL</option>
<option <?php echo e($feeder->discom_name=='AVVNL'?'selected':''); ?>>AVVNL</option>
<option <?php echo e($feeder->discom_name=='JdVVNL'?'selected':''); ?>>JdVVNL</option>
</select>
</div>

<div class="input-group"><input name="discom_code" value="<?php echo e($feeder->discom_code); ?>"><label>DISCOM Code</label></div>
<div class="input-group"><input name="region" value="<?php echo e($feeder->region); ?>"><label>Region</label></div>
<div class="input-group"><input name="office_name" value="<?php echo e($feeder->office_name); ?>"><label>Office</label></div>

<!-- ================= CONSUMER ================= -->
<h3 class="col-span-3 text-indigo-300">👤 Consumer</h3>

<div class="input-group"><input name="consumer_id" value="<?php echo e($feeder->consumer_id); ?>"><label>Consumer ID</label></div>
<div class="input-group"><input name="account_number" value="<?php echo e($feeder->account_number); ?>"><label>Account</label></div>
<div class="input-group"><input name="customer_name" value="<?php echo e($feeder->customer_name); ?>"><label>Name</label></div>

<div class="input-group">
<select name="connection_type">
<option <?php echo e($feeder->connection_type=='Domestic'?'selected':''); ?>>Domestic</option>
<option <?php echo e($feeder->connection_type=='Commercial'?'selected':''); ?>>Commercial</option>
<option <?php echo e($feeder->connection_type=='Industrial'?'selected':''); ?>>Industrial</option>
</select>
</div>

<div class="input-group"><input name="load_sanctioned" value="<?php echo e($feeder->load_sanctioned); ?>"><label>Load</label></div>
<div class="input-group"><input name="contract_demand" value="<?php echo e($feeder->contract_demand); ?>"><label>Contract</label></div>
<div class="input-group"><input name="tariff_category" value="<?php echo e($feeder->tariff_category); ?>"><label>Tariff</label></div>

<!-- ================= ELECTRICAL ================= -->
<h3 class="col-span-3 text-indigo-300">⚡ Electrical</h3>

<div class="input-group"><input name="transformer_capacity" value="<?php echo e($feeder->transformer_capacity); ?>"><label>Transformer</label></div>
<div class="input-group"><input name="connected_load" value="<?php echo e($feeder->connected_load); ?>"><label>Connected Load</label></div>
<div class="input-group"><input name="peak_load" value="<?php echo e($feeder->peak_load); ?>"><label>Peak</label></div>
<div class="input-group"><input name="average_load" value="<?php echo e($feeder->average_load); ?>"><label>Average</label></div>
<div class="input-group"><input name="power_factor" value="<?php echo e($feeder->power_factor); ?>"><label>Power Factor</label></div>

<div class="input-group"><input name="current_r_phase" value="<?php echo e($feeder->current_r_phase); ?>"><label>Current R</label></div>
<div class="input-group"><input name="current_y_phase" value="<?php echo e($feeder->current_y_phase); ?>"><label>Current Y</label></div>
<div class="input-group"><input name="current_b_phase" value="<?php echo e($feeder->current_b_phase); ?>"><label>Current B</label></div>

<div class="input-group"><input name="voltage_r_phase" value="<?php echo e($feeder->voltage_r_phase); ?>"><label>Voltage R</label></div>
<div class="input-group"><input name="voltage_y_phase" value="<?php echo e($feeder->voltage_y_phase); ?>"><label>Voltage Y</label></div>
<div class="input-group"><input name="voltage_b_phase" value="<?php echo e($feeder->voltage_b_phase); ?>"><label>Voltage B</label></div>

<div class="input-group"><input name="frequency" value="<?php echo e($feeder->frequency); ?>"><label>Frequency</label></div>

<!-- ================= METER ================= -->
<h3 class="col-span-3 text-indigo-300">📟 Meter</h3>

<div class="input-group"><input name="meter_serial_number" value="<?php echo e($feeder->meter_serial_number); ?>"><label>Meter No</label></div>
<div class="input-group"><input name="meter_make" value="<?php echo e($feeder->meter_make); ?>"><label>Make</label></div>

<div class="input-group">
<select name="meter_type">
<option <?php echo e($feeder->meter_type=='LT'?'selected':''); ?>>LT</option>
<option <?php echo e($feeder->meter_type=='HT'?'selected':''); ?>>HT</option>
</select>
</div>

<div class="input-group">
<select name="meter_phase">
<option <?php echo e($feeder->meter_phase=='Single'?'selected':''); ?>>Single</option>
<option <?php echo e($feeder->meter_phase=='Three'?'selected':''); ?>>Three</option>
</select>
</div>

<div class="input-group"><input type="date" name="meter_installation_date" value="<?php echo e($feeder->meter_installation_date); ?>"></div>

<div class="input-group">
<select name="meter_status">
<option <?php echo e($feeder->meter_status=='Active'?'selected':''); ?>>Active</option>
<option <?php echo e($feeder->meter_status=='Inactive'?'selected':''); ?>>Inactive</option>
</select>
</div>

<!-- ================= MODEM ================= -->
<h3 class="col-span-3 text-indigo-300">📡 GSM</h3>

<div class="input-group"><input name="imei_number" value="<?php echo e($feeder->imei_number); ?>"><label>IMEI</label></div>
<div class="input-group"><input name="sim_number" value="<?php echo e($feeder->sim_number); ?>"><label>SIM</label></div>

<div class="input-group">
<select name="network_provider">
<option <?php echo e($feeder->network_provider=='Jio'?'selected':''); ?>>Jio</option>
<option <?php echo e($feeder->network_provider=='Airtel'?'selected':''); ?>>Airtel</option>
</select>
</div>

<div class="input-group"><input name="signal_strength" value="<?php echo e($feeder->signal_strength); ?>"><label>Signal</label></div>
<div class="input-group"><input name="ip_address" value="<?php echo e($feeder->ip_address); ?>"><label>IP</label></div>
<div class="input-group"><input name="apn" value="<?php echo e($feeder->apn); ?>"><label>APN</label></div>

<!-- ================= ENERGY ================= -->
<h3 class="col-span-3 text-indigo-300">📊 Energy</h3>

<div class="input-group"><input name="energy_import" value="<?php echo e($feeder->energy_import); ?>"><label>Import</label></div>
<div class="input-group"><input name="energy_export" value="<?php echo e($feeder->energy_export); ?>"><label>Export</label></div>
<div class="input-group"><input name="losses" value="<?php echo e($feeder->losses); ?>"><label>Loss</label></div>
<div class="input-group"><input name="total_units" value="<?php echo e($feeder->total_units); ?>"><label>Total Units</label></div>
<div class="input-group"><input name="billed_units" value="<?php echo e($feeder->billed_units); ?>"><label>Billed</label></div>
<div class="input-group"><input name="collected_revenue" value="<?php echo e($feeder->collected_revenue); ?>"><label>Revenue</label></div>

<!-- ================= MAINTENANCE ================= -->
<h3 class="col-span-3 text-indigo-300">🛠 Maintenance</h3>

<div class="input-group"><input type="date" name="last_maintenance_date" value="<?php echo e($feeder->last_maintenance_date); ?>"></div>
<div class="input-group"><input type="date" name="next_maintenance_date" value="<?php echo e($feeder->next_maintenance_date); ?>"></div>
<div class="input-group"><input name="fault_type" value="<?php echo e($feeder->fault_type); ?>"><label>Fault</label></div>
<div class="input-group"><input name="fault_location" value="<?php echo e($feeder->fault_location); ?>"><label>Location</label></div>

<!-- ================= OPERATOR ================= -->
<h3 class="col-span-3 text-indigo-300">👨‍💼 Operator</h3>

<div class="input-group"><input name="operator_name" value="<?php echo e($feeder->operator_name); ?>"><label>Name</label></div>
<div class="input-group"><input name="operator_id" value="<?php echo e($feeder->operator_id); ?>"><label>ID</label></div>
<div class="input-group"><input name="assigned_engineer" value="<?php echo e($feeder->assigned_engineer); ?>"><label>Engineer</label></div>
<div class="input-group"><input name="contact_number" value="<?php echo e($feeder->contact_number); ?>"><label>Contact</label></div>

<div class="col-span-3 mt-6">
<button class="premium-btn">💾 Update Feeder</button>
</div>

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

<style>
.input-group{position:relative}
.input-group input,.input-group select{
width:100%;padding:14px 14px 14px 40px;border-radius:10px;
border:1px solid rgba(255,255,255,0.2);
background:rgba(255,255,255,0.05);color:#fff
}
.input-group label{
position:absolute;left:40px;top:50%;transform:translateY(-50%);
color:#9ca3af;transition:.3s
}
.input-group input:focus+label,
.input-group input:not(:placeholder-shown)+label{
top:-8px;font-size:11px;background:#111827;padding:0 6px;color:#a5b4fc
}
select option{color:#000;background:#fff}
.premium-btn{
width:100%;padding:14px;border-radius:12px;
background:linear-gradient(135deg,#6366f1,#8b5cf6);
color:white;font-weight:600
}
</style>

<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.app', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH /home2/jitrealx/public_html/amccms/resources/views/feeder/edit.blade.php ENDPATH**/ ?>