<div class="destination-folders-section mb-8 fade-in-htmx" id="destination-folders">
    <div class="section-header bg-base-200 p-4 rounded-t-lg border-b border-base-300">
        <div class="flex flex-col md:flex-row md:items-center md:justify-between">
            <div class="flex flex-col md:flex-row md:items-start md:space-y-0 md:space-x-4">
                <img src="/static/organized.png" class="w-16 h-16 object-contain flex-shrink-0" alt="Organized emails" />
                <div>
                    <h2 class="text-2xl font-bold text-base-content">
                        Destination Folders
                    </h2>
                    <p class="text-base-content/70 mt-1">Folders where emails are organized and stored</p>
                </div>
            </div>
            <div data-loading-states>
                <button class="btn btn-primary" hx-get="/api/folders/new" hx-target="#modal-holder" hx-swap="innerHTML"
                    hx-trigger="click">
                    <i class="fas fa-plus mr-2" data-loading-class="!hidden"></i>
                    <span data-loading-class="!hidden">Create Folder</span>
                    <span class="loading loading-spinner loading-xs hidden" data-loading-class-remove="hidden"></span>
                </button>
            </div>
        </div>
    </div>
    
    <div id="destination-folders-list" class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6 p-6">
        {% for folder in folders|selectattr('folder_type', 'equalto', 'destination') %}
            {% include 'partials/folder_card_destination.html' %}
        {% else %}
        <div class="col-span-full text-center py-12 bg-base-100 rounded-box shadow-lg border border-dashed border-base-300">
            <div class="text-5xl mb-4 text-primary">
                <i class="fas fa-folder-plus"></i>
            </div>
            <h3 class="text-2xl font-bold mb-2">No destination folders yet</h3>
            <p class="mb-6 text-base-content/70">Create destination folders to organize your emails into categories.</p>
            <div data-loading-states>
                <button class="btn btn-primary btn-lg" hx-get="/api/folders/new" hx-target="#modal-holder" hx-swap="innerHTML"
                    hx-trigger="click">
                    <i class="fas fa-plus mr-2" data-loading-class="!hidden"></i>
                    <span data-loading-class="!hidden">Create Folder</span>
                    <span class="loading loading-spinner loading-xs hidden" data-loading-class-remove="hidden"></span>
                </button>
            </div>
        </div>
        {% endfor %}
    </div>
</div>
