"use client";
import * as React from "react";
import { useRenderElement } from "../../utils/useRenderElement.js";
import { useSelectRootContext } from "../root/SelectRootContext.js";
import { triggerOpenStateMapping } from "../../utils/popupStateMapping.js";
import { selectors } from "../store.js";
import { useStore } from "../../../../utils/esm/store/useStore.js";
const SelectIcon = /* @__PURE__ */ React.forwardRef(function SelectIcon2(componentProps, forwardedRef) {
  const {
    className,
    render,
    ...elementProps
  } = componentProps;
  const {
    store
  } = useSelectRootContext();
  const open = useStore(store, selectors.open);
  const state = React.useMemo(() => ({
    open
  }), [open]);
  const element = useRenderElement("span", componentProps, {
    state,
    ref: forwardedRef,
    props: [{
      "aria-hidden": true,
      children: "▼"
    }, elementProps],
    stateAttributesMapping: triggerOpenStateMapping
  });
  return element;
});
if (process.env.NODE_ENV !== "production") SelectIcon.displayName = "SelectIcon";
export {
  SelectIcon
};
//# sourceMappingURL=SelectIcon.js.map
