"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/iconConfig.js";
import { useEnsuredId } from "../useEnsuredId.js";
/**
 * This is a simple `Button` wrapper to be used as a dropdown button within the
 * `Autocomplete`.
 *
 * @since 6.0.0
 */ export function AutocompleteDropdownButton(props) {
    const { id: propId, icon, visible, iconRotatorProps, ...remaining } = props;
    const id = useEnsuredId(propId, "autocomplete-dropdown");
    return /*#__PURE__*/ _jsx(Button, {
        ...remaining,
        id: id,
        "aria-expanded": visible,
        tabIndex: -1,
        buttonType: "icon",
        children: /*#__PURE__*/ _jsx(IconRotator, {
            ...iconRotatorProps,
            rotated: visible,
            children: getIcon("dropdown", icon)
        })
    });
}

//# sourceMappingURL=AutocompleteDropdownButton.js.map