<?= $this->extend('admin/layout') ?>

<?= $this->section('content') ?>
<h1 class="h3 mb-4 text-gray-800">Add New Banner</h1>

<div class="card shadow mb-4">
    <div class="card-body">
        <form action="<?= base_url('admin/banners/create') ?>" method="post" enctype="multipart/form-data">
            <?= csrf_field() ?>
            <div class="mb-3">
                <label>Banner Image</label>
                <input type="file" name="image" class="form-control" required accept="image/*">
            </div>
            <div class="mb-3">
                <label>Title</label>
                <input type="text" name="title" class="form-control">
            </div>
            <div class="mb-3">
                <label>Subtitle</label>
                <input type="text" name="subtitle" class="form-control">
            </div>
            <div class="mb-3">
                <label>Button Text</label>
                <input type="text" name="button_text" class="form-control">
            </div>
            <div class="mb-3">
                <label>Button Link</label>
                <input type="text" name="button_link" class="form-control">
            </div>
            <div class="mb-3">
                <label>Sort Order</label>
                <input type="number" name="sort_order" class="form-control" value="0">
            </div>
            <div class="mb-3">
                <label>Status</label>
                <select name="status" class="form-control">
                    <option value="1">Active</option>
                    <option value="0">Inactive</option>
                </select>
            </div>
            <button type="submit" class="btn btn-success">Save Banner</button>
            <a href="<?= base_url('admin/banners') ?>" class="btn btn-secondary">Cancel</a>
        </form>
    </div>
</div>
<?= $this->endSection() ?>
