{% extends "base.html" %}

{% block title %}My Teams - Knowledge Base{% endblock %}

{% block content %}
<div class="row mb-4">
    <div class="col-md-12">
        <h1>My Teams</h1>
        <p class="text-muted">Collaborate with your colleagues by sharing bookmarks in shared team spaces.</p>
    </div>
</div>

<div class="row">
    {% for team in teams %}
    <div class="col-md-4 mb-4">
        <div class="card h-100 p-4">
            <h5 class="card-title">{{ team.name }}</h5>
            <p class="card-text text-muted">{{ team.description|truncatewords:20 }}</p>
            <div class="mt-auto">
                <a href="{% url 'team-detail' team.pk %}" class="btn btn-outline-primary w-100">View Team Bookmarks</a>
            </div>
        </div>
    </div>
    {% empty %}
    <div class="col-12 text-center py-5">
        <div class="card p-5 bg-light">
            <h3>No teams yet</h3>
            <p>You aren't a member of any teams yet. Teams allow you to share knowledge with others.</p>
        </div>
    </div>
    {% endfor %}
</div>
{% endblock %}
