{% extends "base.html" %}

{% block content %}
<div class="container mt-5">
    <div class="row">
        <div class="col">
            <h1 class="display-4">Welcome, {{ user.username }}!</h1>

            {% if companies %}
                <h2 class="mt-5">Your Companies:</h2>
                <div class="list-group">
                    {% for company in companies %}
                        <a href="{% url 'tender_list' company.id %}" class="list-group-item list-group-item-action">
                            {{ company.name }}
                        </a>
                    {% endfor %}
                </div>
            {% else %}
                <div class="mt-5 p-5 bg-light rounded">
                    <h2>You don't have a company yet.</h2>
                    <p class="lead">Get started by creating a new company.</p>
                    <a href="{% url 'create_company' %}" class="btn btn-primary btn-lg">Create a Company</a>
                </div>
            {% endif %}

        </div>
    </div>
</div>
{% endblock %}
