<div class="row">
    <div class="col-auto align-self-center">
        <span>전체 : {{ $posts->total }}</span>
    </div>
    @if($boardMeta->use_category && $categories)
        <div class="col">
            <select name="category" id="category" class="form-select">
                <option value="">전체 ({{ $categories->total }})</option>
                @foreach($categories->list as $cat)
                    <option value="{{ $cat->id }}" @if($params->category == $cat->id) selected @endif>{{ $cat->name }} ({{ $cat->rows }})</option>
                @endforeach
            </select>
        </div>
    @endif
    <div class="col text-end">
        <select name="sort" id="sort" class="form-select">
            <option value="1" @if($params->sort == 1) selected @endif>날짜순</option>
            <option value="2" @if($params->sort == 2) selected @endif>조회순</option>
            <option value="3" @if($params->sort == 3) selected @endif>댓글순</option>
            <option value="4" @if($params->sort == 4) selected @endif>추천순</option>
        </select>
        <select name="per_page" id="perPage" class="form-select">
            <option value="10" @if($params->perPage == 10) selected @endif>10개씩</option>
            <option value="15" @if($params->perPage == 15) selected @endif>15개씩</option>
            <option value="20" @if($params->perPage == 20) selected @endif>20개씩</option>
            <option value="30" @if($params->perPage == 30) selected @endif>30개씩</option>
            <option value="40" @if($params->perPage == 40) selected @endif>40개씩</option>
            <option value="50" @if($params->perPage == 50) selected @endif>50개씩</option>
        </select>
    </div>
</div>
