@extends('admin.layouts.app')
@section('title', 'Create Flash Sale')
@section('content')
<div class="card" style="max-width:700px">
    <div class="card-header">Create Flash Sale</div>
    <form action="{{ route('admin.flash-sales.store') }}" method="POST">
        @csrf
        <div class="form-group">
            <label>Title *</label>
            <input type="text" name="title" class="form-control" value="{{ old('title') }}" required>
        </div>
        <div class="form-group">
            <label>Description</label>
            <textarea name="description" class="form-control" rows="3">{{ old('description') }}</textarea>
        </div>
        <div class="form-row">
            <div class="form-group">
                <label>Discount %</label>
                <input type="number" name="discount_percentage" class="form-control" value="{{ old('discount_percentage') }}" min="0" max="100">
            </div>
            <div class="form-group">
                <label>Badge Text</label>
                <input type="text" name="badge_text" class="form-control" value="{{ old('badge_text') }}" placeholder="e.g. SALE, HOT">
            </div>
        </div>
        <div class="form-row">
            <div class="form-group">
                <label>Button Text</label>
                <input type="text" name="btn_text" class="form-control" value="{{ old('btn_text') }}">
            </div>
            <div class="form-group">
                <label>Button Link</label>
                <input type="text" name="btn_link" class="form-control" value="{{ old('btn_link') }}">
            </div>
        </div>
        <div class="form-row">
            <div class="form-group">
                <label>Start Date</label>
                <input type="datetime-local" name="start_date" class="form-control" value="{{ old('start_date') }}">
            </div>
            <div class="form-group">
                <label>End Date</label>
                <input type="datetime-local" name="end_date" class="form-control" value="{{ old('end_date') }}">
            </div>
        </div>
        <div class="form-row">
            <div class="form-group">
                <label>Order</label>
                <input type="number" name="order" class="form-control" value="0" min="0">
            </div>
            <div class="form-group">
                <label class="checkbox-label" style="margin-top:24px"><input type="checkbox" name="is_active" value="1" checked> Active</label>
            </div>
        </div>
        <button type="submit" class="btn btn-primary">Create Flash Sale</button>
    </form>
</div>
@endsection
