import { caseInsensitiveSearch } from "../searching/caseInsensitive.js";
import { defaultExtractor } from "../searching/utils.js";
/**
 * @since 6.0.0
 * @since 6.2.0 Added support for `item.name` and provide better error messaging.
 * @internal
 */ export const defaultAutocompleteExtractor = defaultExtractor("Autocomplete", "getOptionLabel");
/**
 * @since 6.0.0
 * @internal
 */ export const defaultAutocompleteFilter = (options)=>caseInsensitiveSearch({
        ...options,
        startsWith: true
    });
/**
 * @since 6.0.0
 */ export const noopAutocompleteFilter = (options)=>options.list;
/**
 * @since 6.0.0
 * @internal
 */ const isProbablyMenuItemProps = (item)=>!!item && typeof item === "object";
/**
 * @since 6.0.0
 * @internal
 */ export const defaultAutocompleteGetOptionProps = (options)=>{
    const { option } = options;
    if (isProbablyMenuItemProps(option)) {
        const { leftAddon, rightAddon, className, children, disabled, height, textProps, textClassName, primaryText, secondaryText, secondaryTextClassName, multiline, disableTextChildren } = option;
        return {
            children,
            leftAddon,
            rightAddon,
            className,
            disabled,
            height,
            textProps,
            textClassName,
            primaryText,
            secondaryText,
            secondaryTextClassName,
            multiline,
            disableTextChildren
        };
    }
    return;
};

//# sourceMappingURL=defaults.js.map