<!-- templates/interviews/schedule_interviews.html -->
{% extends "base.html" %}

{% block content %}
<div class="container mt-4">
    <h1>Schedule Interviews for {{ job.title }}</h1>

    <div class="card mt-4">
        <div class="card-body">
            <form method="post">
                {% csrf_token %}

                <div class="row">
                    <div class="col-md-6">
                        <h5>Select Candidates</h5>
                        <div class="form-group">
                            {{ form.candidates }}
                        </div>
                    </div>

                    <div class="col-md-6">
                        <h5>Schedule Details</h5>

                        <div class="form-group">
                            <label for="{{ form.start_date.id_for_label }}">Start Date</label>
                            {{ form.start_date }}
                        </div>

                        <div class="form-group">
                            <label for="{{ form.end_date.id_for_label }}">End Date</label>
                            {{ form.end_date }}
                        </div>

                        <div class="form-group">
                            <label>Working Days</label>
                            {{ form.working_days }}
                        </div>

                        <div class="row">
                            <div class="col-md-6">
                                <div class="form-group">
                                    <label for="{{ form.start_time.id_for_label }}">Start Time</label>
                                    {{ form.start_time }}
                                </div>
                            </div>

                            <div class="col-md-6">
                                <div class="form-group">
                                    <label for="{{ form.end_time.id_for_label }}">End Time</label>
                                    {{ form.end_time }}
                                </div>
                            </div>
                        </div>

                        <div class="row">
                            <div class="col-md-6">
                                <div class="form-group">
                                    <label for="{{ form.break_start_time.id_for_label }}">Break Start Time</label>
                                    {{ form.break_start_time }}
                                </div>
                            </div>

                            <div class="col-md-6">
                                <div class="form-group">
                                    <label for="{{ form.break_end_time.id_for_label }}">Break End Time</label>
                                    {{ form.break_end_time }}
                                </div>
                            </div>
                        </div>

                        <div class="row">
                            <div class="col-md-6">
                                <div class="form-group">
                                    <label for="{{ form.interview_duration.id_for_label }}">Interview Duration (minutes)</label>
                                    {{ form.interview_duration }}
                                </div>
                            </div>

                            <div class="col-md-6">
                                <div class="form-group">
                                    <label for="{{ form.buffer_time.id_for_label }}">Buffer Time (minutes)</label>
                                    {{ form.buffer_time }}
                                </div>
                            </div>
                        </div>
                    </div>
                </div>

                <div class="mt-4">
                    <button type="submit" class="btn btn-primary">Schedule Interviews</button>
                    <a href="{% url 'job_detail' slug=job.slug %}" class="btn btn-secondary">Cancel</a>
                </div>
            </form>
        </div>
    </div>
</div>
{% endblock %}