"use client";
import { jsx as _jsx } from "react/jsx-runtime";
import { Button } from "../button/Button.js";
import { IconRotator } from "../icon/IconRotator.js";
import { getIcon } from "../icon/config.js";
import { useEnsuredId } from "../useEnsuredId.js";
import { autocompleteDropdownButton } from "./autocompleteStyles.js";
/**
 * This is a simple `Button` wrapper to be used as a dropdown button within the
 * `Autocomplete`.
 *
 * @see {@link https://react-md.dev/components/autocomplete | Autocomplete Demos}
 * @since 6.0.0
 */ export function AutocompleteDropdownButton(props) {
    const { id: propId, icon, visible, iconRotatorProps, className, ...remaining } = props;
    const id = useEnsuredId(propId, "autocomplete-dropdown");
    return /*#__PURE__*/ _jsx(Button, {
        ...remaining,
        id: id,
        "aria-expanded": visible,
        tabIndex: -1,
        buttonType: "icon",
        className: autocompleteDropdownButton({
            className
        }),
        children: /*#__PURE__*/ _jsx(IconRotator, {
            ...iconRotatorProps,
            rotated: visible,
            children: getIcon("dropdown", icon)
        })
    });
}

//# sourceMappingURL=AutocompleteDropdownButton.js.map