<div class="search">
    <div class="row">
        <div class="col">
            <form name="f_board_search" id="fBoardSearch" method="get" action="{{ $listURL }}" autocomplete="off" accept-charset="UTF-8">
                <input type="hidden" name="page" value="{{ $params->page }}"/>
                <input type="hidden" name="per_page" value="{{ $params->perPage }}"/>
                <input type="hidden" name="sort" value="{{ $params->sort }}"/>
                <input type="hidden" name="category" value="{{ $params->category }}"/>

                <div class="row g-2">
                    <div class="col-auto">
                        <select name="field" id="field" class="form-select">
                            <option value="1" @if($params->field == '1') selected @endif>제목 + 내용</option>
                            <option value="2" @if($params->field == '2') selected @endif>제목</option>
                            <option value="3" @if($params->field == '3') selected @endif>글 작성자</option>
                            <option value="4" @if($params->field == '4') selected @endif>댓글 내용</option>
                            <option value="5" @if($params->field == '5') selected @endif>댓글 작성자</option>
                        </select>
                    </div>
                    <div class="col-auto">
                        <input type="text" name="keyword" id="keyword" class="form-control" value="{{ $params->keyword }}" placeholder="검색"/>
                    </div>
                    <div class="col">
                        <button type="submit" class="btn btn-dark">검색</button>
                    </div>
                </div>
            </form>
        </div>
        <div class="col text-end">
            @can('create', [$board, $boardMeta])
                <a href="{{ $writeURL }}" id="btnPostWrite" class="btn btn-primary" data-auth-checked="{{ $boardMeta->item(BOARD_PERMIT_TYPE_3, 0) > 0 ? '1' : '0' }}">글쓰기</a>
            @endcan
        </div>
    </div>
</div>
