var $16c7f9b22cce3838$exports = require("./Button.cjs");
var $365d89633c2041bc$exports = require("./Checkbox.cjs");
var $048d76b84370f141$exports = require("./utils.cjs");
var $f7b82bedbb70abac$exports = require("./Collection.cjs");
var $d3d8871226fc64f2$exports = require("./DragAndDrop.cjs");
var $433949643203e332$exports = require("./Autocomplete.cjs");
var $537333b300f7e667$exports = require("./ListBox.cjs");
var $61557b2a9b2862a8$exports = require("./SelectionIndicator.cjs");
var $9a60bd90621ebc78$exports = require("./SharedElementTransition.cjs");
var $cab7d9a238d19c33$exports = require("./Text.cjs");
var $lEvRe$reactariauseGridList = require("react-aria/useGridList");
var $lEvRe$reactariaprivatecollectionsCollectionBuilder = require("react-aria/private/collections/CollectionBuilder");
var $lEvRe$reactariaprivateutilsfilterDOMProps = require("react-aria/private/utils/filterDOMProps");
var $lEvRe$reactariaFocusScope = require("react-aria/FocusScope");
var $lEvRe$reactariaprivatecollectionsBaseCollection = require("react-aria/private/collections/BaseCollection");
var $lEvRe$reactariaprivateutilsinertValue = require("react-aria/private/utils/inertValue");
var $lEvRe$reactariaListKeyboardDelegate = require("react-aria/ListKeyboardDelegate");
var $lEvRe$reactstatelyuseListState = require("react-stately/useListState");
var $lEvRe$reactariaprivateutilsuseLoadMoreSentinel = require("react-aria/private/utils/useLoadMoreSentinel");
var $lEvRe$reactariamergeProps = require("react-aria/mergeProps");
var $lEvRe$react = require("react");
var $lEvRe$reactariauseCollator = require("react-aria/useCollator");
var $lEvRe$reactariauseFocusRing = require("react-aria/useFocusRing");
var $lEvRe$reactariauseHover = require("react-aria/useHover");
var $lEvRe$reactariaI18nProvider = require("react-aria/I18nProvider");
var $lEvRe$reactariauseObjectRef = require("react-aria/useObjectRef");
var $lEvRe$reactariaVisuallyHidden = require("react-aria/VisuallyHidden");


function $parcel$interopDefault(a) {
  return a && a.__esModule ? a.default : a;
}

function $parcel$export(e, n, v, s) {
  Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
}

$parcel$export(module.exports, "GridListContext", function () { return $baa7ef94f966d95f$export$54fe942636b6416d; });
$parcel$export(module.exports, "GridList", function () { return $baa7ef94f966d95f$export$a7bfbda1311ca015; });
$parcel$export(module.exports, "GridListItem", function () { return $baa7ef94f966d95f$export$e96fc9a8407faa6b; });
$parcel$export(module.exports, "GridListLoadMoreItem", function () { return $baa7ef94f966d95f$export$392b9a0bbc7c7e43; });
$parcel$export(module.exports, "GridListSection", function () { return $baa7ef94f966d95f$export$f696877219115b14; });
$parcel$export(module.exports, "GridListHeaderContext", function () { return $baa7ef94f966d95f$export$87f5843bfb30d205; });
$parcel$export(module.exports, "GridListHeaderInnerContext", function () { return $baa7ef94f966d95f$export$bc7e8a4031ec2a33; });
$parcel$export(module.exports, "GridListHeader", function () { return $baa7ef94f966d95f$export$1b574dbdb0075ff6; });
/*
 * Copyright 2022 Adobe. All rights reserved.
 * This file is licensed to you under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License. You may obtain a copy
 * of the License at http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software distributed under
 * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
 * OF ANY KIND, either express or implied. See the License for the specific language
 * governing permissions and limitations under the License.
 */ 


























const $baa7ef94f966d95f$export$54fe942636b6416d = /*#__PURE__*/ (0, $lEvRe$react.createContext)(null);
const $baa7ef94f966d95f$export$a7bfbda1311ca015 = /*#__PURE__*/ (0, $lEvRe$react.forwardRef)(function GridList(props, ref) {
    // Render the portal first so that we have the collection by the time we render the DOM in SSR.
    [props, ref] = (0, $048d76b84370f141$exports.useContextProps)(props, ref, $baa7ef94f966d95f$export$54fe942636b6416d);
    return /*#__PURE__*/ (0, ($parcel$interopDefault($lEvRe$react))).createElement((0, $lEvRe$reactariaprivatecollectionsCollectionBuilder.CollectionBuilder), {
        content: /*#__PURE__*/ (0, ($parcel$interopDefault($lEvRe$react))).createElement((0, $lEvRe$reactariaprivatecollectionsCollectionBuilder.Collection), props)
    }, (collection)=>/*#__PURE__*/ (0, ($parcel$interopDefault($lEvRe$react))).createElement($baa7ef94f966d95f$var$GridListInner, {
            props: props,
            collection: collection,
            gridListRef: ref
        }));
});
function $baa7ef94f966d95f$var$GridListInner({ props: props, collection: collection, gridListRef: ref }) {
    [props, ref] = (0, $048d76b84370f141$exports.useContextProps)(props, ref, (0, $433949643203e332$exports.SelectableCollectionContext));
    // eslint-disable-next-line @typescript-eslint/no-unused-vars
    let { shouldUseVirtualFocus: shouldUseVirtualFocus, filter: filter, disallowTypeAhead: disallowTypeAhead, ...DOMCollectionProps } = props;
    let { dragAndDropHooks: dragAndDropHooks, keyboardNavigationBehavior: keyboardNavigationBehavior = 'arrow', layout: layout = 'stack', orientation: orientation = 'vertical' } = props;
    let { CollectionRoot: CollectionRoot, isVirtualized: isVirtualized, layoutDelegate: layoutDelegate, dropTargetDelegate: ctxDropTargetDelegate } = (0, $lEvRe$react.useContext)((0, $f7b82bedbb70abac$exports.CollectionRendererContext));
    let gridlistState = (0, $lEvRe$reactstatelyuseListState.useListState)({
        ...DOMCollectionProps,
        collection: collection,
        children: undefined,
        layoutDelegate: layoutDelegate
    });
    let filteredState = (0, $lEvRe$reactstatelyuseListState.UNSTABLE_useFilteredListState)(gridlistState, filter);
    let collator = (0, $lEvRe$reactariauseCollator.useCollator)({
        usage: 'search',
        sensitivity: 'base'
    });
    let { disabledBehavior: disabledBehavior, disabledKeys: disabledKeys } = filteredState.selectionManager;
    let { direction: direction } = (0, $lEvRe$reactariaI18nProvider.useLocale)();
    let keyboardDelegate = (0, $lEvRe$react.useMemo)(()=>new (0, $lEvRe$reactariaListKeyboardDelegate.ListKeyboardDelegate)({
            collection: filteredState.collection,
            collator: collator,
            ref: ref,
            disabledKeys: disabledKeys,
            disabledBehavior: disabledBehavior,
            layoutDelegate: layoutDelegate,
            layout: layout,
            orientation: orientation,
            direction: direction
        }), [
        filteredState.collection,
        ref,
        layout,
        orientation,
        disabledKeys,
        disabledBehavior,
        layoutDelegate,
        collator,
        direction
    ]);
    let { gridProps: gridProps } = (0, $lEvRe$reactariauseGridList.useGridList)({
        ...DOMCollectionProps,
        keyboardDelegate: keyboardDelegate,
        // Only tab navigation is supported in grid layout.
        keyboardNavigationBehavior: layout === 'grid' ? 'tab' : keyboardNavigationBehavior,
        isVirtualized: isVirtualized,
        shouldSelectOnPressUp: props.shouldSelectOnPressUp,
        disallowTypeAhead: disallowTypeAhead
    }, filteredState, ref);
    let selectionManager = filteredState.selectionManager;
    let isListDraggable = !!dragAndDropHooks?.useDraggableCollectionState;
    let isListDroppable = !!dragAndDropHooks?.useDroppableCollectionState;
    let dragHooksProvided = (0, $lEvRe$react.useRef)(isListDraggable);
    let dropHooksProvided = (0, $lEvRe$react.useRef)(isListDroppable);
    (0, $lEvRe$react.useEffect)(()=>{
        if (process.env.NODE_ENV === 'production') return;
        if (dragHooksProvided.current !== isListDraggable) console.warn('Drag hooks were provided during one render, but not another. This should be avoided as it may produce unexpected behavior.');
        if (dropHooksProvided.current !== isListDroppable) console.warn('Drop hooks were provided during one render, but not another. This should be avoided as it may produce unexpected behavior.');
    }, [
        isListDraggable,
        isListDroppable
    ]);
    let dragState = undefined;
    let dropState = undefined;
    let droppableCollection = undefined;
    let isRootDropTarget = false;
    let dragPreview = null;
    let preview = (0, $lEvRe$react.useRef)(null);
    if (isListDraggable && dragAndDropHooks) {
        dragState = dragAndDropHooks.useDraggableCollectionState({
            collection: filteredState.collection,
            selectionManager: selectionManager,
            preview: dragAndDropHooks.renderDragPreview ? preview : undefined
        });
        dragAndDropHooks.useDraggableCollection({}, dragState, ref);
        let DragPreview = dragAndDropHooks.DragPreview;
        dragPreview = dragAndDropHooks.renderDragPreview ? /*#__PURE__*/ (0, ($parcel$interopDefault($lEvRe$react))).createElement(DragPreview, {
            ref: preview
        }, dragAndDropHooks.renderDragPreview) : null;
    }
    if (isListDroppable && dragAndDropHooks) {
        dropState = dragAndDropHooks.useDroppableCollectionState({
            collection: filteredState.collection,
            selectionManager: selectionManager
        });
        let dropTargetDelegate = dragAndDropHooks.dropTargetDelegate || ctxDropTargetDelegate || new dragAndDropHooks.ListDropTargetDelegate(collection, ref, {
            layout: layout,
            direction: direction,
            orientation: orientation
        });
        droppableCollection = dragAndDropHooks.useDroppableCollection({
            keyboardDelegate: keyboardDelegate,
            dropTargetDelegate: dropTargetDelegate
        }, dropState, ref);
        isRootDropTarget = dropState.isDropTarget({
            type: 'root'
        });
    }
    let { focusProps: focusProps, isFocused: isFocused, isFocusVisible: isFocusVisible } = (0, $lEvRe$reactariauseFocusRing.useFocusRing)();
    let isEmpty = filteredState.collection.size === 0;
    let renderValues = {
        isDropTarget: isRootDropTarget,
        orientation: orientation,
        isEmpty: isEmpty,
        isFocused: isFocused,
        isFocusVisible: isFocusVisible,
        layout: layout,
        state: filteredState
    };
    let renderProps = (0, $048d76b84370f141$exports.useRenderProps)({
        ...props,
        children: undefined,
        defaultClassName: 'react-aria-GridList',
        values: renderValues
    });
    let emptyState = null;
    let emptyStatePropOverrides = null;
    if (isEmpty && props.renderEmptyState) {
        let content = props.renderEmptyState(renderValues);
        emptyState = /*#__PURE__*/ (0, ($parcel$interopDefault($lEvRe$react))).createElement("div", {
            role: "row",
            "aria-rowindex": 1,
            style: {
                display: 'contents'
            }
        }, /*#__PURE__*/ (0, ($parcel$interopDefault($lEvRe$react))).createElement("div", {
            role: "gridcell",
            style: {
                display: 'contents'
            }
        }, content));
    }
    let DOMProps = (0, $lEvRe$reactariaprivateutilsfilterDOMProps.filterDOMProps)(props, {
        global: true
    });
    return /*#__PURE__*/ (0, ($parcel$interopDefault($lEvRe$react))).createElement((0, $lEvRe$reactariaFocusScope.FocusScope), null, /*#__PURE__*/ (0, ($parcel$interopDefault($lEvRe$react))).createElement((0, $048d76b84370f141$exports.dom).div, {
        ...(0, $lEvRe$reactariamergeProps.mergeProps)(DOMProps, renderProps, gridProps, focusProps, droppableCollection?.collectionProps, emptyStatePropOverrides),
        ref: ref,
        slot: props.slot || undefined,
        onScroll: props.onScroll,
        "data-drop-target": isRootDropTarget || undefined,
        "data-empty": isEmpty || undefined,
        "data-focused": isFocused || undefined,
        "data-focus-visible": isFocusVisible || undefined,
        "data-layout": layout,
        "data-orientation": orientation
    }, /*#__PURE__*/ (0, ($parcel$interopDefault($lEvRe$react))).createElement((0, $048d76b84370f141$exports.Provider), {
        values: [
            [
                (0, $537333b300f7e667$exports.ListStateContext),
                filteredState
            ],
            [
                (0, $d3d8871226fc64f2$exports.DragAndDropContext),
                {
                    dragAndDropHooks: dragAndDropHooks,
                    dragState: dragState,
                    dropState: dropState
                }
            ],
            [
                (0, $d3d8871226fc64f2$exports.DropIndicatorContext),
                {
                    render: $baa7ef94f966d95f$var$GridListDropIndicatorWrapper
                }
            ]
        ]
    }, isListDroppable && /*#__PURE__*/ (0, ($parcel$interopDefault($lEvRe$react))).createElement($baa7ef94f966d95f$var$RootDropIndicator, null), /*#__PURE__*/ (0, ($parcel$interopDefault($lEvRe$react))).createElement((0, $9a60bd90621ebc78$exports.SharedElementTransition), null, /*#__PURE__*/ (0, ($parcel$interopDefault($lEvRe$react))).createElement(CollectionRoot, {
        collection: filteredState.collection,
        scrollRef: ref,
        persistedKeys: (0, $d3d8871226fc64f2$exports.useDndPersistedKeys)(selectionManager, dragAndDropHooks, dropState),
        renderDropIndicator: (0, $d3d8871226fc64f2$exports.useRenderDropIndicator)(dragAndDropHooks, dropState)
    }))), emptyState, dragPreview));
}
const $baa7ef94f966d95f$export$e96fc9a8407faa6b = /*#__PURE__*/ (0, $lEvRe$reactariaprivatecollectionsCollectionBuilder.createLeafComponent)((0, $lEvRe$reactariaprivatecollectionsBaseCollection.ItemNode), function GridListItem(props, forwardedRef, item) {
    let state = (0, $lEvRe$react.useContext)((0, $537333b300f7e667$exports.ListStateContext));
    let { dragAndDropHooks: dragAndDropHooks, dragState: dragState, dropState: dropState } = (0, $lEvRe$react.useContext)((0, $d3d8871226fc64f2$exports.DragAndDropContext));
    let ref = (0, $lEvRe$reactariauseObjectRef.useObjectRef)(forwardedRef);
    let { isVirtualized: isVirtualized } = (0, $lEvRe$react.useContext)((0, $f7b82bedbb70abac$exports.CollectionRendererContext));
    let { rowProps: rowProps, gridCellProps: gridCellProps, descriptionProps: descriptionProps, ...states } = (0, $lEvRe$reactariauseGridList.useGridListItem)({
        node: item,
        shouldSelectOnPressUp: !!dragState,
        isVirtualized: isVirtualized
    }, state, ref);
    let { hoverProps: hoverProps, isHovered: isHovered } = (0, $lEvRe$reactariauseHover.useHover)({
        isDisabled: !states.allowsSelection && !states.hasAction,
        onHoverStart: item.props.onHoverStart,
        onHoverChange: item.props.onHoverChange,
        onHoverEnd: item.props.onHoverEnd
    });
    let { isFocusVisible: isFocusVisible, focusProps: focusProps } = (0, $lEvRe$reactariauseFocusRing.useFocusRing)();
    let { checkboxProps: checkboxProps } = (0, $lEvRe$reactariauseGridList.useGridListSelectionCheckbox)({
        key: item.key
    }, state);
    let buttonProps = state.selectionManager.disabledBehavior === 'all' && states.isDisabled ? {
        isDisabled: true
    } : {};
    let draggableItem = null;
    if (dragState && dragAndDropHooks) draggableItem = dragAndDropHooks.useDraggableItem({
        key: item.key,
        hasDragButton: true
    }, dragState);
    let dropIndicator = null;
    let dropIndicatorRef = (0, $lEvRe$react.useRef)(null);
    let { visuallyHiddenProps: visuallyHiddenProps } = (0, $lEvRe$reactariaVisuallyHidden.useVisuallyHidden)();
    if (dropState && dragAndDropHooks) dropIndicator = dragAndDropHooks.useDropIndicator({
        target: {
            type: 'item',
            key: item.key,
            dropPosition: 'on'
        }
    }, dropState, dropIndicatorRef);
    let isDragging = dragState && dragState.isDragging(item.key);
    let renderProps = (0, $048d76b84370f141$exports.useRenderProps)({
        ...props,
        id: undefined,
        children: item.rendered,
        defaultClassName: 'react-aria-GridListItem',
        values: {
            ...states,
            isHovered: isHovered,
            isFocusVisible: isFocusVisible,
            selectionMode: state.selectionManager.selectionMode,
            selectionBehavior: state.selectionManager.selectionBehavior,
            allowsDragging: !!dragState,
            isDragging: isDragging,
            isDropTarget: dropIndicator?.isDropTarget,
            id: item.key,
            state: state
        }
    });
    let dragButtonRef = (0, $lEvRe$react.useRef)(null);
    (0, $lEvRe$react.useEffect)(()=>{
        if (dragState && !dragButtonRef.current) console.warn('Draggable items in a GridList must contain a <Button slot="drag"> element so that keyboard and screen reader users can drag them.');
    // eslint-disable-next-line
    }, []);
    (0, $lEvRe$react.useEffect)(()=>{
        if (!item.textValue && process.env.NODE_ENV !== 'production') console.warn('A `textValue` prop is required for <GridListItem> elements with non-plain text children in order to support accessibility features such as type to select.');
    }, [
        item.textValue
    ]);
    let DOMProps = (0, $lEvRe$reactariaprivateutilsfilterDOMProps.filterDOMProps)(props, {
        global: true
    });
    delete DOMProps.id;
    delete DOMProps.onClick;
    return /*#__PURE__*/ (0, ($parcel$interopDefault($lEvRe$react))).createElement((0, ($parcel$interopDefault($lEvRe$react))).Fragment, null, dropIndicator && !dropIndicator.isHidden && /*#__PURE__*/ (0, ($parcel$interopDefault($lEvRe$react))).createElement("div", {
        role: "row",
        style: {
            position: 'absolute'
        }
    }, /*#__PURE__*/ (0, ($parcel$interopDefault($lEvRe$react))).createElement("div", {
        role: "gridcell"
    }, /*#__PURE__*/ (0, ($parcel$interopDefault($lEvRe$react))).createElement("div", {
        role: "button",
        ...visuallyHiddenProps,
        ...dropIndicator?.dropIndicatorProps,
        ref: dropIndicatorRef
    }))), /*#__PURE__*/ (0, ($parcel$interopDefault($lEvRe$react))).createElement((0, $048d76b84370f141$exports.dom).div, {
        ...(0, $lEvRe$reactariamergeProps.mergeProps)(DOMProps, renderProps, rowProps, focusProps, hoverProps, draggableItem?.dragProps),
        ref: ref,
        "data-selected": states.isSelected || undefined,
        "data-disabled": states.isDisabled || undefined,
        "data-hovered": isHovered || undefined,
        "data-focused": states.isFocused || undefined,
        "data-focus-visible": isFocusVisible || undefined,
        "data-pressed": states.isPressed || undefined,
        "data-allows-dragging": !!dragState || undefined,
        "data-dragging": isDragging || undefined,
        "data-drop-target": dropIndicator?.isDropTarget || undefined,
        "data-selection-mode": state.selectionManager.selectionMode === 'none' ? undefined : state.selectionManager.selectionMode
    }, /*#__PURE__*/ (0, ($parcel$interopDefault($lEvRe$react))).createElement("div", {
        ...gridCellProps,
        style: {
            display: 'contents'
        }
    }, /*#__PURE__*/ (0, ($parcel$interopDefault($lEvRe$react))).createElement((0, $048d76b84370f141$exports.Provider), {
        values: [
            [
                (0, $365d89633c2041bc$exports.CheckboxContext),
                {
                    slots: {
                        [(0, $048d76b84370f141$exports.DEFAULT_SLOT)]: {},
                        selection: checkboxProps
                    }
                }
            ],
            [
                (0, $16c7f9b22cce3838$exports.ButtonContext),
                {
                    slots: {
                        [(0, $048d76b84370f141$exports.DEFAULT_SLOT)]: buttonProps,
                        drag: {
                            ...draggableItem?.dragButtonProps,
                            ref: dragButtonRef,
                            style: {
                                pointerEvents: 'none'
                            }
                        }
                    }
                }
            ],
            [
                (0, $cab7d9a238d19c33$exports.TextContext),
                {
                    slots: {
                        [(0, $048d76b84370f141$exports.DEFAULT_SLOT)]: {},
                        description: descriptionProps
                    }
                }
            ],
            [
                (0, $f7b82bedbb70abac$exports.CollectionRendererContext),
                (0, $f7b82bedbb70abac$exports.DefaultCollectionRenderer)
            ],
            [
                (0, $537333b300f7e667$exports.ListStateContext),
                null
            ],
            [
                (0, $433949643203e332$exports.SelectableCollectionContext),
                null
            ],
            [
                (0, $433949643203e332$exports.FieldInputContext),
                null
            ],
            [
                (0, $61557b2a9b2862a8$exports.SelectionIndicatorContext),
                {
                    isSelected: states.isSelected
                }
            ]
        ]
    }, renderProps.children))));
});
function $baa7ef94f966d95f$var$GridListDropIndicatorWrapper(props, ref) {
    ref = (0, $lEvRe$reactariauseObjectRef.useObjectRef)(ref);
    let { dragAndDropHooks: dragAndDropHooks, dropState: dropState } = (0, $lEvRe$react.useContext)((0, $d3d8871226fc64f2$exports.DragAndDropContext));
    let buttonRef = (0, $lEvRe$react.useRef)(null);
    let { dropIndicatorProps: dropIndicatorProps, isHidden: isHidden, isDropTarget: isDropTarget } = dragAndDropHooks.useDropIndicator(props, dropState, buttonRef);
    if (isHidden) return null;
    return /*#__PURE__*/ (0, ($parcel$interopDefault($lEvRe$react))).createElement($baa7ef94f966d95f$var$GridListDropIndicatorForwardRef, {
        ...props,
        dropIndicatorProps: dropIndicatorProps,
        isDropTarget: isDropTarget,
        buttonRef: buttonRef,
        ref: ref
    });
}
function $baa7ef94f966d95f$var$GridListDropIndicator(props, ref) {
    let { dropIndicatorProps: dropIndicatorProps, isDropTarget: isDropTarget, buttonRef: buttonRef, ...otherProps } = props;
    let { visuallyHiddenProps: visuallyHiddenProps } = (0, $lEvRe$reactariaVisuallyHidden.useVisuallyHidden)();
    let renderProps = (0, $048d76b84370f141$exports.useRenderProps)({
        ...otherProps,
        defaultClassName: 'react-aria-DropIndicator',
        values: {
            isDropTarget: isDropTarget
        }
    });
    return /*#__PURE__*/ (0, ($parcel$interopDefault($lEvRe$react))).createElement((0, $048d76b84370f141$exports.dom).div, {
        ...renderProps,
        role: "row",
        ref: ref,
        "data-drop-target": isDropTarget || undefined
    }, /*#__PURE__*/ (0, ($parcel$interopDefault($lEvRe$react))).createElement("div", {
        role: "gridcell"
    }, /*#__PURE__*/ (0, ($parcel$interopDefault($lEvRe$react))).createElement("div", {
        ...visuallyHiddenProps,
        role: "button",
        ...dropIndicatorProps,
        ref: buttonRef
    }), renderProps.children));
}
const $baa7ef94f966d95f$var$GridListDropIndicatorForwardRef = /*#__PURE__*/ (0, $lEvRe$react.forwardRef)($baa7ef94f966d95f$var$GridListDropIndicator);
function $baa7ef94f966d95f$var$RootDropIndicator() {
    let { dragAndDropHooks: dragAndDropHooks, dropState: dropState } = (0, $lEvRe$react.useContext)((0, $d3d8871226fc64f2$exports.DragAndDropContext));
    let ref = (0, $lEvRe$react.useRef)(null);
    let { dropIndicatorProps: dropIndicatorProps } = dragAndDropHooks.useDropIndicator({
        target: {
            type: 'root'
        }
    }, dropState, ref);
    let isDropTarget = dropState.isDropTarget({
        type: 'root'
    });
    let { visuallyHiddenProps: visuallyHiddenProps } = (0, $lEvRe$reactariaVisuallyHidden.useVisuallyHidden)();
    if (!isDropTarget && dropIndicatorProps['aria-hidden']) return null;
    return /*#__PURE__*/ (0, ($parcel$interopDefault($lEvRe$react))).createElement("div", {
        role: "row",
        "aria-hidden": dropIndicatorProps['aria-hidden'],
        style: {
            position: 'absolute'
        }
    }, /*#__PURE__*/ (0, ($parcel$interopDefault($lEvRe$react))).createElement("div", {
        role: "gridcell"
    }, /*#__PURE__*/ (0, ($parcel$interopDefault($lEvRe$react))).createElement("div", {
        role: "button",
        ...visuallyHiddenProps,
        ...dropIndicatorProps,
        ref: ref
    })));
}
const $baa7ef94f966d95f$export$392b9a0bbc7c7e43 = (0, $lEvRe$reactariaprivatecollectionsCollectionBuilder.createLeafComponent)((0, $lEvRe$reactariaprivatecollectionsBaseCollection.LoaderNode), function GridListLoadingIndicator(props, ref, item) {
    let state = (0, $lEvRe$react.useContext)((0, $537333b300f7e667$exports.ListStateContext));
    let { isVirtualized: isVirtualized } = (0, $lEvRe$react.useContext)((0, $f7b82bedbb70abac$exports.CollectionRendererContext));
    let { isLoading: isLoading, onLoadMore: onLoadMore, scrollOffset: scrollOffset, ...otherProps } = props;
    let sentinelRef = (0, $lEvRe$react.useRef)(null);
    let memoedLoadMoreProps = (0, $lEvRe$react.useMemo)(()=>({
            onLoadMore: onLoadMore,
            collection: state?.collection,
            sentinelRef: sentinelRef,
            scrollOffset: scrollOffset
        }), [
        onLoadMore,
        scrollOffset,
        state?.collection
    ]);
    (0, $lEvRe$reactariaprivateutilsuseLoadMoreSentinel.useLoadMoreSentinel)(memoedLoadMoreProps, sentinelRef);
    let renderProps = (0, $048d76b84370f141$exports.useRenderProps)({
        ...otherProps,
        id: undefined,
        children: item.rendered,
        defaultClassName: 'react-aria-GridListLoadingIndicator',
        values: undefined
    });
    // For now don't include aria-posinset and aria-setsize on loader since they aren't keyboard focusable
    // Arguably shouldn't include them ever since it might be confusing to the user to include the loaders as part of the
    // item count
    return /*#__PURE__*/ (0, ($parcel$interopDefault($lEvRe$react))).createElement((0, ($parcel$interopDefault($lEvRe$react))).Fragment, null, /*#__PURE__*/ (0, ($parcel$interopDefault($lEvRe$react))).createElement("div", {
        style: {
            position: 'relative',
            width: 0,
            height: 0
        },
        inert: (0, $lEvRe$reactariaprivateutilsinertValue.inertValue)(true)
    }, /*#__PURE__*/ (0, ($parcel$interopDefault($lEvRe$react))).createElement("div", {
        "data-testid": "loadMoreSentinel",
        ref: sentinelRef,
        style: {
            position: 'absolute',
            height: 1,
            width: 1
        }
    })), isLoading && renderProps.children && /*#__PURE__*/ (0, ($parcel$interopDefault($lEvRe$react))).createElement((0, $048d76b84370f141$exports.dom).div, {
        ...renderProps,
        ...(0, $lEvRe$reactariaprivateutilsfilterDOMProps.filterDOMProps)(props, {
            global: true
        }),
        role: "row",
        ref: ref
    }, /*#__PURE__*/ (0, ($parcel$interopDefault($lEvRe$react))).createElement("div", {
        "aria-colindex": isVirtualized ? 1 : undefined,
        role: "gridcell"
    }, renderProps.children)));
});
const $baa7ef94f966d95f$export$f696877219115b14 = /*#__PURE__*/ (0, $lEvRe$reactariaprivatecollectionsCollectionBuilder.createBranchComponent)((0, $lEvRe$reactariaprivatecollectionsBaseCollection.SectionNode), (props, ref, item)=>{
    let state = (0, $lEvRe$react.useContext)((0, $537333b300f7e667$exports.ListStateContext));
    let { CollectionBranch: CollectionBranch } = (0, $lEvRe$react.useContext)((0, $f7b82bedbb70abac$exports.CollectionRendererContext));
    let headingRef = (0, $lEvRe$react.useRef)(null);
    ref = (0, $lEvRe$reactariauseObjectRef.useObjectRef)(ref);
    let { rowHeaderProps: rowHeaderProps, rowProps: rowProps, rowGroupProps: rowGroupProps } = (0, $lEvRe$reactariauseGridList.useGridListSection)({
        'aria-label': props['aria-label'] ?? undefined
    }, state, ref);
    let renderProps = (0, $048d76b84370f141$exports.useRenderProps)({
        ...props,
        id: undefined,
        children: undefined,
        defaultClassName: 'react-aria-GridListSection',
        values: undefined
    });
    let DOMProps = (0, $lEvRe$reactariaprivateutilsfilterDOMProps.filterDOMProps)(props, {
        global: true
    });
    delete DOMProps.id;
    return /*#__PURE__*/ (0, ($parcel$interopDefault($lEvRe$react))).createElement((0, $048d76b84370f141$exports.dom).div, {
        ...(0, $lEvRe$reactariamergeProps.mergeProps)(DOMProps, renderProps, rowGroupProps),
        ref: ref
    }, /*#__PURE__*/ (0, ($parcel$interopDefault($lEvRe$react))).createElement((0, $048d76b84370f141$exports.Provider), {
        values: [
            [
                $baa7ef94f966d95f$export$87f5843bfb30d205,
                {
                    ...rowProps,
                    ref: headingRef
                }
            ],
            [
                $baa7ef94f966d95f$export$bc7e8a4031ec2a33,
                {
                    ...rowHeaderProps
                }
            ]
        ]
    }, /*#__PURE__*/ (0, ($parcel$interopDefault($lEvRe$react))).createElement(CollectionBranch, {
        collection: state.collection,
        parent: item
    })));
});
const $baa7ef94f966d95f$export$87f5843bfb30d205 = /*#__PURE__*/ (0, $lEvRe$react.createContext)({});
const $baa7ef94f966d95f$export$bc7e8a4031ec2a33 = /*#__PURE__*/ (0, $lEvRe$react.createContext)(null);
const $baa7ef94f966d95f$export$1b574dbdb0075ff6 = /*#__PURE__*/ (0, $lEvRe$reactariaprivatecollectionsCollectionBuilder.createLeafComponent)((0, $lEvRe$reactariaprivatecollectionsBaseCollection.HeaderNode), function Header(props, ref) {
    [props, ref] = (0, $048d76b84370f141$exports.useContextProps)(props, ref, $baa7ef94f966d95f$export$87f5843bfb30d205);
    let rowHeaderProps = (0, $lEvRe$react.useContext)($baa7ef94f966d95f$export$bc7e8a4031ec2a33);
    return /*#__PURE__*/ (0, ($parcel$interopDefault($lEvRe$react))).createElement((0, $048d76b84370f141$exports.dom).div, {
        render: props.render,
        className: "react-aria-GridListHeader",
        ref: ref,
        ...props
    }, /*#__PURE__*/ (0, ($parcel$interopDefault($lEvRe$react))).createElement("div", {
        ...rowHeaderProps,
        style: {
            display: 'contents'
        }
    }, props.children));
});


//# sourceMappingURL=GridList.cjs.map
