<?php $__template->layout('Layout.main'); ?>
<?php $__template->section('title'); ?>تعديل التسعير<?php $__template->endSection(); ?>
<?php $__template->section('content'); ?>
<form method="POST" action="/pricing/<?= (int) $config->id ?>">
    <?= csrf_field() ?>
    <div class="card" style="padding:20px;">
        <div style="display:grid;grid-template-columns:1fr 1fr;gap:20px;">
            <div class="form-group">
                <label class="form-label">السعر (ج.م) <span style="color:#DC2626;">*</span></label>
                <input type="number" name="price" value="<?= e($config->price) ?>" class="form-input" step="0.01" min="0" required>
            </div>
            <div class="form-group">
                <label class="form-label">تاريخ السريان <span style="color:#DC2626;">*</span></label>
                <input type="date" name="effective_from" value="<?= e($config->effective_from) ?>" class="form-input" required>
            </div>
            <div class="form-group">
                <label class="form-label">تاريخ الانتهاء</label>
                <input type="date" name="effective_to" value="<?= e($config->effective_to ?? '') ?>" class="form-input">
            </div>
            <div class="form-group" style="grid-column:1/-1;">
                <label class="form-label">ملاحظات</label>
                <textarea name="notes" class="form-textarea" rows="3"><?= e($config->notes ?? '') ?></textarea>
            </div>
        </div>
    </div>
    <button type="submit" class="btn btn-primary" style="margin-top:20px;">حفظ</button>
    <a href="/pricing" class="btn btn-outline" style="margin-top:20px;">إلغاء</a>
</form>
<?php $__template->endSection(); ?>