<?php

$title = 'Conference Sponsors';

$sponsors =
    $sponsors ?? [];

?>

<div class="container py-5">

<div class="d-flex justify-content-between align-items-center mb-5">

<h2 class="fw-bold">

<i class="fa fa-handshake"></i>

Conference Sponsors

</h2>

<a
href="/easychair/admin/conference-sponsors/create"
class="btn btn-primary rounded-pill px-4">

<i class="fa fa-plus"></i>

Add Sponsor

</a>

</div>

<div class="row g-4">

<?php foreach($sponsors as $s): ?>

<div class="col-lg-4">

<div class="card shadow-lg border-0 rounded-4 h-100">

<div class="card-body p-4">

<?php if(!empty($s['logo'])): ?>

<img
src="/easychair/<?= htmlspecialchars(
$s['logo']
) ?>"
class="img-fluid mb-4"
style="
height:90px;
object-fit:contain;
">

<?php endif; ?>

<h4 class="fw-bold">

<?= htmlspecialchars(
$s['name_en']
?? ''
) ?>

</h4>

<div class="text-muted mb-3">

<?= htmlspecialchars(
$s['name_ar']
?? ''
) ?>

</div>

<span class="badge bg-warning text-dark">

<?= htmlspecialchars(
$s['sponsor_tier']
?? 'Partner'
) ?>

</span>

<div class="mt-4 d-flex gap-2">

<a
href="/easychair/admin/conference-sponsors/delete?id=<?= (int)$s['id'] ?>"
class="btn btn-outline-danger rounded-pill">

Delete

</a>

</div>

</div>

</div>

</div>

<?php endforeach; ?>

</div>

</div>
