"use client"; import React from "react"; import { SEARCH_SCOPE } from "@/lib/frontend/search/urlState"; import SearchQueryBox from "@/components/search/form/SearchQueryBox"; import SearchScopeSelect from "@/components/search/form/SearchScopeSelect"; import SearchLimitSelect from "@/components/search/form/SearchLimitSelect"; import SearchSingleBranchCombobox from "@/components/search/form/SearchSingleBranchCombobox"; import SearchMultiBranchPicker from "@/components/search/form/SearchMultiBranchPicker"; export default function SearchForm({ branch, qDraft, onQDraftChange, onSubmit, currentQuery, isSubmitting, isAdminDev, scope, onScopeChange, onSingleBranchChange, availableBranches, branchesStatus, selectedBranches, onToggleBranch, onClearAllBranches, limit, onLimitChange, }) { const canSearch = typeof qDraft === "string" && qDraft.trim().length > 0; // RHL-038 UI behavior: // - Single scope shows an extra combobox (branch picker). // - Multi/All does not. // - We animate the combobox container (max-width/max-height/opacity) so the // query block (input + search button) grows/shrinks smoothly. const showSingleBranchCombobox = Boolean( isAdminDev && scope === SEARCH_SCOPE.SINGLE ); return (