<?php $__template->layout('Layout.main'); ?>
<?php $__template->section('title'); ?>إنشاء فرع جديد<?php $__template->endSection(); ?>
<?php $__template->section('content'); ?>
<form method="POST" action="/branches">
    <?= 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="text" name="branch_code" value="<?= e(old('branch_code')) ?>" class="form-input" required>
            </div>
            <div class="form-group">
                <label class="form-label">الاسم بالعربي <span style="color:#DC2626;">*</span></label>
                <input type="text" name="name_ar" value="<?= e(old('name_ar')) ?>" class="form-input" required>
            </div>
            <div class="form-group">
                <label class="form-label">الاسم بالإنجليزي</label>
                <input type="text" name="name_en" value="<?= e(old('name_en')) ?>" class="form-input">
            </div>
            <div class="form-group">
                <label class="form-label">الهاتف</label>
                <input type="text" name="phone" value="<?= e(old('phone')) ?>" class="form-input">
            </div>
            <div class="form-group">
                <label class="form-label">اسم المدير</label>
                <input type="text" name="manager_name" value="<?= e(old('manager_name')) ?>" class="form-input">
            </div>
            <div class="form-group" style="grid-column:1/-1;">
                <label class="form-label">العنوان</label>
                <textarea name="address" class="form-textarea" rows="3"><?= e(old('address')) ?></textarea>
            </div>
        </div>
    </div>
    <button type="submit" class="btn btn-primary" style="margin-top:20px;">إنشاء الفرع</button>
    <a href="/branches" class="btn btn-outline" style="margin-top:20px;">إلغاء</a>
</form>
<?php $__template->endSection(); ?>