import { jsx as _jsx } from "react/jsx-runtime";
import { useCallback } from "react";
import { UserPicker, } from "../../components/ui/UserPicker";
import { searchUsers as searchBackendUsers } from "../services/userService";
export function QuotaUserPicker({ value, displayValue, disabled = false, placeholder = "Select user", buttonTestId, onChange, }) {
    const searchUsers = useCallback(async (query, limit) => {
        return searchBackendUsers(query, limit);
    }, []);
    return (_jsx(UserPicker, { value: value, displayValue: displayValue, disabled: disabled, placeholder: placeholder, buttonTestId: buttonTestId, buttonClassName: "w-full justify-start border-border-default bg-white text-sm font-normal text-neutral-grey-100 hover:bg-neutral-grey-5", inputClassName: "h-9 text-sm", searchUsers: searchUsers, onChange: (next) => {
            if (!next)
                return;
            onChange({
                userName: next.userName,
                displayName: next.displayName,
            });
        } }));
}
//# sourceMappingURL=QuotaUserPicker.js.map