import { useTagContext } from './3XAVFTCA.js';
import { usePopoverStoreProps } from './O2PQ2652.js';
import { useCompositeStoreOptions, useCompositeStoreProps } from './4CMBR7SL.js';
import { useStore, useStoreProps } from './YV4JVR4I.js';
import { useUpdateEffect } from './ABQUS43J.js';
import { __spreadProps, __spreadValues } from './3YLGPPWQ.js';
import { createComboboxStore } from '../../../../../../@ariakit_core@0.4.15/node_modules/@ariakit/core/esm/combobox/combobox-store.js';

function useComboboxStoreOptions(props) {
  const tag = useTagContext();
  props = __spreadProps(__spreadValues({}, props), {
    tag: props.tag !== void 0 ? props.tag : tag
  });
  return useCompositeStoreOptions(props);
}
function useComboboxStoreProps(store, update, props) {
  useUpdateEffect(update, [props.tag]);
  useStoreProps(store, props, "value", "setValue");
  useStoreProps(store, props, "selectedValue", "setSelectedValue");
  useStoreProps(store, props, "resetValueOnHide");
  useStoreProps(store, props, "resetValueOnSelect");
  return Object.assign(
    useCompositeStoreProps(
      usePopoverStoreProps(store, update, props),
      update,
      props
    ),
    { tag: props.tag }
  );
}
function useComboboxStore(props = {}) {
  props = useComboboxStoreOptions(props);
  const [store, update] = useStore(createComboboxStore, props);
  return useComboboxStoreProps(store, update, props);
}

export { useComboboxStore, useComboboxStoreOptions, useComboboxStoreProps };
//# sourceMappingURL=246BTTYR.js.map
