@extends('layouts.admin')

@section('title', 'Create Banner')

@section('admin-content')
    <div class="page-header">
        <div>
            <h3 class="page-title">Create Banner</h3>
            <p class="text-muted mb-0">Add a new advertisement banner</p>
        </div>
        <a href="{{ route('admin.banners.index') }}" class="btn btn-light border shadow-sm">
            <i class="bi bi-arrow-left me-1"></i> Back to List
        </a>
    </div>

    <div class="row justify-content-center">
        <div class="col-md-8">
            <div class="card shadow-sm">
                <div class="card-body p-4">
                    <form action="{{ route('admin.banners.store') }}" method="POST" enctype="multipart/form-data">
                        @csrf
                        <div class="mb-3">
                            <label class="form-label fw-bold">Banner Image <span class="text-danger">*</span></label>
                            <input type="file" name="image" class="form-control" accept="image/*" required>
                            <div class="form-text">Recommended size: 1200x400px for Home Top.</div>
                        </div>

                        <div class="row g-3 mb-3">
                            <div class="col-md-6">
                                <label class="form-label fw-bold">Position <span class="text-danger">*</span></label>
                                <select name="position" class="form-select" required>
                                    <option value="home_top">Home Top (Slider)</option>
                                    <option value="home_top_right_1">Home Top Right (Top)</option>
                                    <option value="home_top_right_2">Home Top Right (Bottom)</option>
                                    <option value="home_middle">Home Middle</option>
                                    <option value="footer">Footer</option>
                                    <option value="client_logo">Client Logo</option>
                                    <option disabled>--- Product/Supplier Pages ---</option>
                                    <option value="product_sidebar">Product Page Sidebar (Vertical)</option>
                                    <option value="product_middle">Product Page Middle (Horizontal)</option>
                                    <option value="supplier_sidebar">Supplier Page Sidebar (Vertical)</option>
                                    <option value="supplier_middle">Supplier Page Middle (Horizontal)</option>
                                    <option value="profile_sidebar">Seller Profile Sidebar (Vertical)</option>
                                    <option value="profile_middle">Seller Profile Middle (Horizontal)</option>
                                </select>
                            </div>
                            <div class="col-md-6">
                                <label class="form-label fw-bold">Type <span class="text-danger">*</span></label>
                                <select name="type" class="form-select" required>
                                    <option value="standard">Standard</option>
                                    <option value="blink">Blink Effect</option>
                                    <option value="slider">Slider (Auto-rotate)</option>
                                </select>
                            </div>
                        </div>

                        <div class="mb-3">
                            <label class="form-label fw-bold">Link URL (Optional)</label>
                            <input type="url" name="link" class="form-control" placeholder="https://...">
                        </div>

                        <button type="submit" class="btn btn-primary-gradient w-100 py-2">
                            <i class="bi bi-plus-lg me-2"></i> Create Banner
                        </button>
                    </form>
                </div>
            </div>
        </div>
    </div>
@endsection
