<?php require __DIR__ . '/../../layouts/header.php'; ?>
<div class="d-flex justify-content-between align-items-center mb-4">
    <h1 class="page-title"><?= e(trans('attendance_desk')) ?></h1>
    <a href="<?= e(base_path('admin/attendance')) ?>" class="btn ec-btn btn-outline-secondary rounded-3"><?= e(trans('back')) ?></a>
</div>

<div class="ec-card  "><div class="ec-card-body p-4">
<form method="post" action="<?= e(base_path('admin/attendance/create')) ?>">
<input type="hidden" name="_csrf" value="<?= e(csrf_token()) ?>">
<div class="row g-3">
    <div class="col-md-6">
        <label class="form-label ec-required"><?= e(trans('conference')) ?></label>
        <select name="conference_id" class="form-select rounded-3" required>
            <?php foreach ($conferences as $c): ?>
                <option value="<?= e((string) $c['id']) ?>"><?= e(current_lang() === 'ar' ? (string) ($c['title_ar'] ?? '') : (string) ($c['title_en'] ?? '')) ?></option>
            <?php endforeach; ?>
        </select>
    </div>
    <div class="col-md-6">
        <label class="form-label ec-required"><?= e(trans('attendee_type')) ?></label>
        <select name="attendee_type" class="form-select rounded-3">
            <?php foreach (['author','reviewer','tpc','speaker','guest','attendee','organizer'] as $t): ?>
                <option value="<?= e($t) ?>"><?= e(trans($t)) ?></option>
            <?php endforeach; ?>
        </select>
    </div>
    <div class="col-md-6"><label class="form-label ec-required"><?= e(trans('full_name_en')) ?></label><input type="text" name="full_name_en" class="form-control rounded-3" required></div>
    <div class="col-md-6"><label class="form-label"><?= e(trans('full_name_ar')) ?></label><input type="text" name="full_name_ar" class="form-control rounded-3"></div>
    <div class="col-md-6"><label class="form-label"><?= e(trans('email')) ?></label><input type="email" name="email" class="form-control rounded-3"></div>
    <div class="col-md-6"><label class="form-label"><?= e(trans('mobile')) ?></label><input type="text" name="mobile" class="form-control rounded-3"></div>
    <div class="col-md-12"><label class="form-label"><?= e(trans('rating_notes')) ?></label><textarea name="notes" class="form-control rounded-3" rows="4"></textarea></div>
</div>
<div class="mt-4"><button class="btn ec-btn btn-success rounded-3"><?= e(trans('save')) ?></button></div>
</form>
</div></div>
<?php require __DIR__ . '/../../layouts/footer.php'; ?>
