require("./ListView.css");
var $7a26131f6144af2b$exports = require("./ActionButtonGroup.cjs");
var $e5a758dd286599f2$exports = require("./ActionMenu.cjs");
var $e991cbcdf82ced71$exports = require("./CenterBaseline.cjs");
var $af04e099a53d3e85$exports = require("./Checkbox.cjs");
var $1df9f1c9262ce5df$exports = require("./Chevron.cjs");
var $bde97c91243ed164$exports = require("../icons/Icon.cjs");
var $053b76ed3d29e13b$exports = require("./Image.cjs");
var $4526404114e78c80$exports = require("./intlStrings.cjs");
var $377d9a1b51957cfd$exports = require("./LinkOut.cjs");
var $1c116ea4b0d2d023$exports = require("./ProgressCircle.cjs");
var $6367bc87eb7d24ad$exports = require("./Content.cjs");
var $85bf454149fe9ddc$exports = require("./ActionBar.cjs");
var $ee7b4c497f520c08$exports = require("./utils.cjs");
var $ac757a4c2bd72aee$exports = require("../icons/useSpectrumContextProps.cjs");
var $jpFeb$reactjsxruntime = require("react/jsx-runtime");
var $jpFeb$reactariacomponents = require("react-aria-components");
var $jpFeb$react = require("react");
var $jpFeb$reactspectrumutils = require("@react-spectrum/utils");
var $jpFeb$reactaria = require("react-aria");


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, "ListViewContext", () => $387d58020e2a8028$export$870039b0abfe3de0);
$parcel$export(module.exports, "ListView", () => $387d58020e2a8028$export$84d0dd190d551cd1);
$parcel$export(module.exports, "ListViewItem", () => $387d58020e2a8028$export$c6bde0c04b033c0e);
/*
 * Copyright 2026 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 $387d58020e2a8028$export$870039b0abfe3de0 = /*#__PURE__*/ (0, $jpFeb$react.createContext)(null);
let $387d58020e2a8028$var$InternalListViewContext = /*#__PURE__*/ (0, $jpFeb$react.createContext)({});
const $387d58020e2a8028$var$listViewWrapper = function anonymous(props, overrides) {
    let rules = " ";
    let minHeight = false;
    let minWidth = false;
    let position = false;
    let matches = String(overrides || '').matchAll(/(?:^|\s)(J|G|I|H|_u|_v|_s|__A|_d|_J|z|y|B|A|_P|_9|W|_l|_A|_z|_6|Z|N|L|F|M|K)[^\s]+/g);
    for (let p of matches){
        if (p[1] === "M") minHeight = true;
        if (p[1] === "N") minWidth = true;
        if (p[1] === "_P") position = true;
        rules += p[0];
    }
    if (!minHeight) rules += ' Ma11';
    if (!minWidth) rules += ' Na11';
    rules += ' sd11';
    rules += ' _Bb11';
    rules += ' __ca11';
    if (!position) rules += ' _Pc11';
    rules += ' _Nb11';
    rules += ' Pb11';
    return rules;
};
// When any row has a trailing icon, reserve space so actions align.
const $387d58020e2a8028$var$hasTrailingIconRows = ':has([data-has-trailing-icon]) [role="row"]';
const $387d58020e2a8028$var$listView = function anonymous(props) {
    let rules = " ";
    if (props.isFocusVisible) rules += ' _Lf11';
    else rules += ' _Le11';
    rules += ' Oh11';
    rules += ' Olc11';
    rules += ' _Mc11';
    if (props.isQuiet) rules += ' _Ka11';
    else rules += ' _Kb11';
    rules += ' _4c11';
    rules += ' Ma11';
    rules += ' Na11';
    rules += ' Za11';
    rules += ' Fb11';
    rules += ' _oa11';
    rules += ' _Na11';
    rules += ' Pa11';
    if (props.size === "XL") {
        rules += ' -_6BNtrc-e11';
        rules += ' vx11';
    } else if (props.size === "L") {
        rules += ' -_6BNtrc-d11';
        rules += ' vx11';
    } else if (props.size === "S") {
        rules += ' -_6BNtrc-b11';
        rules += ' vx11';
    } else if (props.size === "XS") {
        rules += ' -_6BNtrc-a11';
        rules += ' vx11';
    } else {
        rules += ' -_6BNtrc-c11';
        rules += ' vx11';
    }
    if (props.isQuiet) rules += ' g911';
    else rules += ' gX11';
    rules += ' gla11';
    if (props.isQuiet) rules += ' od11';
    else rules += ' ob11';
    if (props.isQuiet) rules += ' nd11';
    else rules += ' nb11';
    if (props.isQuiet) rules += ' kd11';
    else rules += ' kb11';
    if (props.isQuiet) rules += ' jd11';
    else rules += ' jb11';
    rules += ' iq11';
    if (props.isQuiet) rules += ' _ka11';
    else rules += ' _kb11';
    if (props.isQuiet) rules += ' ha11';
    else rules += ' hb11';
    if (props.isQuiet) rules += ' ma11';
    else rules += ' mb11';
    if (props.isQuiet) rules += ' la11';
    else rules += ' lb11';
    rules += ' _jf11';
    rules += ' -Ev4N4b-Zd11';
    rules += ' -Ev4N4b-1bNH0cZuUmpre11';
    return rules;
};
const $387d58020e2a8028$export$84d0dd190d551cd1 = /*#__PURE__*/ (0, $jpFeb$react.forwardRef)(function ListView(props, ref) {
    [props, ref] = (0, $ac757a4c2bd72aee$exports.useSpectrumContextProps)(props, ref, $387d58020e2a8028$export$870039b0abfe3de0);
    let { children: children, isQuiet: isQuiet, selectionStyle: selectionStyle = 'checkbox', overflowMode: overflowMode = 'truncate', loadingState: loadingState, onLoadMore: onLoadMore, renderEmptyState: userRenderEmptyState, hideLinkOutIcon: hideLinkOutIcon = false, ...otherProps } = props;
    let scale = (0, $ee7b4c497f520c08$exports.useScale)();
    let stringFormatter = (0, $jpFeb$reactaria.useLocalizedStringFormatter)((0, ($parcel$interopDefault($4526404114e78c80$exports))), '@react-spectrum/s2');
    let rowHeight = scale === 'large' ? 50 : 40;
    let domRef = (0, $jpFeb$reactspectrumutils.useDOMRef)(ref);
    let scrollRef = (0, $jpFeb$react.useRef)(null);
    let isLoading = loadingState === 'loading' || loadingState === 'loadingMore';
    let renderEmptyState;
    if (userRenderEmptyState != null && !isLoading) renderEmptyState = (renderProps)=>/*#__PURE__*/ (0, $jpFeb$reactjsxruntime.jsx)("div", {
            className: $387d58020e2a8028$var$emptyStateWrapper,
            children: /*#__PURE__*/ (0, $jpFeb$reactjsxruntime.jsx)((0, $jpFeb$reactariacomponents.CollectionRendererContext).Provider, {
                value: (0, $jpFeb$reactariacomponents.DefaultCollectionRenderer),
                children: userRenderEmptyState(renderProps)
            })
        });
    else if (loadingState === 'loading') renderEmptyState = ()=>/*#__PURE__*/ (0, $jpFeb$reactjsxruntime.jsx)("div", {
            className: $387d58020e2a8028$var$centeredWrapper,
            children: /*#__PURE__*/ (0, $jpFeb$reactjsxruntime.jsx)("div", {
                className: $387d58020e2a8028$var$loadingSpinnerWrapper,
                children: /*#__PURE__*/ (0, $jpFeb$reactjsxruntime.jsx)((0, $1c116ea4b0d2d023$exports.ProgressCircle), {
                    isIndeterminate: true,
                    "aria-label": stringFormatter.format('table.loading')
                })
            })
        });
    let loadMoreSpinner = onLoadMore ? /*#__PURE__*/ (0, $jpFeb$reactjsxruntime.jsx)((0, $jpFeb$reactariacomponents.GridListLoadMoreItem), {
        isLoading: loadingState === 'loadingMore',
        onLoadMore: onLoadMore,
        className: " Fb11 Za11 Tt11 Qt11",
        children: /*#__PURE__*/ (0, $jpFeb$reactjsxruntime.jsx)("div", {
            className: $387d58020e2a8028$var$centeredWrapper,
            children: /*#__PURE__*/ (0, $jpFeb$reactjsxruntime.jsx)("div", {
                className: $387d58020e2a8028$var$loadingSpinnerWrapper,
                children: /*#__PURE__*/ (0, $jpFeb$reactjsxruntime.jsx)((0, $1c116ea4b0d2d023$exports.ProgressCircle), {
                    isIndeterminate: true,
                    "aria-label": stringFormatter.format('table.loadingMore')
                })
            })
        })
    }) : null;
    let wrappedChildren;
    let gridListProps = otherProps;
    if (typeof children === 'function' && otherProps.items) {
        let { items: items, dependencies: dependencies = [], ...rest } = otherProps;
        gridListProps = rest;
        wrappedChildren = /*#__PURE__*/ (0, $jpFeb$reactjsxruntime.jsxs)((0, $jpFeb$reactjsxruntime.Fragment), {
            children: [
                /*#__PURE__*/ (0, $jpFeb$reactjsxruntime.jsx)((0, $jpFeb$reactariacomponents.Collection), {
                    items: items,
                    dependencies: dependencies,
                    children: children
                }),
                loadMoreSpinner
            ]
        });
    } else wrappedChildren = /*#__PURE__*/ (0, $jpFeb$reactjsxruntime.jsxs)((0, $jpFeb$reactjsxruntime.Fragment), {
        children: [
            children,
            loadMoreSpinner
        ]
    });
    let { selectedKeys: selectedKeys, onSelectionChange: onSelectionChange, actionBar: actionBar, actionBarHeight: actionBarHeight } = (0, $85bf454149fe9ddc$exports.useActionBarContainer)({
        ...props,
        scrollRef: scrollRef
    });
    return /*#__PURE__*/ (0, $jpFeb$reactjsxruntime.jsxs)("div", {
        ref: domRef,
        className: (props.UNSAFE_className || '') + $387d58020e2a8028$var$listViewWrapper(null, props.styles),
        style: props.UNSAFE_style,
        children: [
            /*#__PURE__*/ (0, $jpFeb$reactjsxruntime.jsx)((0, $jpFeb$reactariacomponents.Virtualizer), {
                layout: (0, $jpFeb$reactariacomponents.ListLayout),
                layoutOptions: {
                    estimatedRowHeight: rowHeight,
                    loaderHeight: 60
                },
                children: /*#__PURE__*/ (0, $jpFeb$reactjsxruntime.jsx)($387d58020e2a8028$var$InternalListViewContext.Provider, {
                    value: {
                        isQuiet: isQuiet,
                        selectionStyle: selectionStyle,
                        overflowMode: overflowMode,
                        scale: scale,
                        hideLinkOutIcon: hideLinkOutIcon
                    },
                    children: /*#__PURE__*/ (0, $jpFeb$reactjsxruntime.jsx)((0, $jpFeb$reactariacomponents.GridList), {
                        ref: scrollRef,
                        ...gridListProps,
                        selectionBehavior: selectionStyle === 'highlight' ? 'replace' : 'toggle',
                        selectionMode: gridListProps.selectionMode,
                        renderEmptyState: renderEmptyState,
                        style: {
                            paddingBottom: actionBarHeight > 0 ? actionBarHeight + 8 : 0,
                            scrollPaddingBottom: actionBarHeight > 0 ? actionBarHeight + 8 : 0
                        },
                        className: (renderProps)=>$387d58020e2a8028$var$listView({
                                ...renderProps,
                                isQuiet: isQuiet
                            }),
                        selectedKeys: selectedKeys,
                        defaultSelectedKeys: undefined,
                        onSelectionChange: onSelectionChange,
                        children: wrappedChildren
                    })
                })
            }),
            actionBar
        ]
    });
});
const $387d58020e2a8028$var$selectedBackground = "[color-mix(in srgb, light-dark(rgb(255, 255, 255), rgb(17, 17, 17)), light-dark(rgb(19, 19, 19), rgb(242, 242, 242)) 7%)]";
const $387d58020e2a8028$var$selectedActiveBackground = "[color-mix(in srgb, light-dark(rgb(255, 255, 255), rgb(17, 17, 17)), light-dark(rgb(19, 19, 19), rgb(242, 242, 242)) 10%)]";
const $387d58020e2a8028$var$listitem = function anonymous(props) {
    let rules = " ";
    rules += ' _Le11';
    rules += ' _oa11';
    rules += ' qh11';
    rules += ' Sd11';
    rules += ' Rd11';
    rules += ' Tt11';
    rules += ' Qt11';
    rules += ' g911';
    if (props.isDisabled) {
        rules += ' pp11';
        rules += ' plc11';
    } else if (props.isSelected) {
        if (props.isPressed) rules += ' po11';
        else if (props.isFocusVisible) rules += ' po11';
        else if (props.isHovered) rules += ' po11';
        else rules += ' pt11';
    } else {
        if (props.isPressed) rules += ' pt11';
        else if (props.isFocusVisible) rules += ' pt11';
        else if (props.isHovered) rules += ' pt11';
        else rules += ' pv11';
    }
    rules += ' _Pc11';
    rules += ' z2mU11';
    rules += ' yzZKy11';
    rules += ' se11';
    rules += ' C91zTN11';
    rules += ' DIVIQId11';
    rules += ' Exumf9b11';
    rules += ' UDNKd2dai5a011';
    rules += ' ea11';
    if (props.scale === "large") rules += ' MODqQub11';
    else rules += ' Mh11';
    rules += ' _Xa11';
    if (props.isLink) rules += ' ry11';
    else rules += ' ri11';
    if (props.isSelected) {
        if (props.selectionStyle === "checkbox") rules += ' -EH8uVb-iq11';
        else if (props.selectionStyle === "highlight") rules += ' -EH8uVb-iw11';
    } else rules += ' -EH8uVb-iq11';
    rules += ' -EH8uVb-lia11';
    rules += ' _ka11';
    if (props.isLastItem) {
        if (props.isQuiet) rules += ' ha11';
        else rules += ' hb11';
    } else rules += ' hb11';
    rules += ' ma11';
    rules += ' la11';
    rules += ' _jf11';
    if (props.isSelected) rules += ' iA11';
    else if (props.isNextSelected) rules += ' iA11';
    else rules += ' i4pzfu11';
    return rules;
};
const $387d58020e2a8028$var$listRowBackground = function anonymous(props) {
    let rules = " ";
    if (props.isFocusVisible) rules += ' _Lf11';
    else rules += ' _Le11';
    rules += ' Oh11';
    rules += ' Olc11';
    rules += ' _Mc11';
    rules += ' _Kb11';
    rules += ' _Pa11';
    rules += ' _9a11';
    if (props.isFirstItem) rules += ' Wr11';
    else if (props.isPrevSelected) rules += ' Wr11';
    else if (props.isSelected) rules += ' WLPOtrc11';
    else rules += ' Wr11';
    rules += ' _Er11';
    rules += ' _Rr11';
    if (props.isSelected) rules += ' _lLPOtrc11';
    else rules += ' _lr11';
    if (props.isSelected) {
        if (props.selectionStyle === "highlight") {
            if (props.isPressed) rules += ' gaZwDBe11';
            else if (props.isHovered) rules += ' gaZwDBe11';
            else rules += ' glzvDBe11';
        } else if (props.selectionStyle === "checkbox") {
            if (props.isFocusVisible) rules += ' gRfT7e11';
            else if (props.isPressed) rules += ' gRfT7e11';
            else if (props.isHovered) rules += ' gRfT7e11';
            else rules += ' gj1B7i11';
        }
    } else if (props.isPressed) {
        if (props.selectionStyle === "checkbox") rules += ' gRfT7e11';
        else rules += ' g7IonAe11';
    } else if (props.isHovered) {
        if (props.selectionStyle === "checkbox") rules += ' gj1B7i11';
        else rules += ' gVQkD8c11';
    } else rules += ' gs9yXOb11';
    rules += ' gla11';
    if (props.isFirstItem) {
        if (props.isFocusVisible) rules += ' ob11';
        else if (props.isQuiet) rules += ' ob11';
        else if (props.isSelected) {
            if (props.selectionStyle === "highlight") rules += ' ob11';
            else if (props.selectionStyle === "checkbox") rules += ' od11';
        }
    }
    if (props.isFirstItem) {
        if (props.isFocusVisible) rules += ' nb11';
        else if (props.isQuiet) rules += ' nb11';
        else if (props.isSelected) {
            if (props.selectionStyle === "highlight") rules += ' nb11';
            else if (props.selectionStyle === "checkbox") rules += ' nd11';
        }
    }
    if (props.isLastItem) {
        if (props.isFocusVisible) rules += ' kb11';
        else if (props.isQuiet) rules += ' kb11';
        else if (props.isSelected) {
            if (props.selectionStyle === "highlight") rules += ' kb11';
            else if (props.selectionStyle === "checkbox") rules += ' kd11';
        }
    }
    if (props.isLastItem) {
        if (props.isFocusVisible) rules += ' jb11';
        else if (props.isQuiet) rules += ' jb11';
        else if (props.isSelected) {
            if (props.selectionStyle === "highlight") rules += ' jb11';
            else if (props.selectionStyle === "checkbox") rules += ' jd11';
        }
    }
    if (props.isPrevSelected) rules += ' _ka11';
    else {
        if (props.selectionStyle === "highlight") rules += ' _kb11';
        else if (props.selectionStyle === "checkbox") rules += ' _ka11';
    }
    if (props.isNextSelected) rules += ' ha11';
    else {
        if (props.selectionStyle === "highlight") rules += ' hb11';
        else if (props.selectionStyle === "checkbox") rules += ' ha11';
    }
    if (props.selectionStyle === "highlight") rules += ' mb11';
    else if (props.selectionStyle === "checkbox") rules += ' ma11';
    if (props.selectionStyle === "highlight") rules += ' lb11';
    else if (props.selectionStyle === "checkbox") rules += ' la11';
    rules += ' _jf11';
    if (props.isSelected) {
        if (props.selectionStyle === "highlight") rules += ' i4pzfu11';
        else if (props.selectionStyle === "checkbox") rules += ' iA11';
    } else rules += ' iA11';
    return rules;
};
let $387d58020e2a8028$export$1237798dc640739a = function anonymous(props) {
    let rules = " ";
    rules += ' zv6x9r11';
    rules += ' yv6x9r11';
    rules += ' Bv6x9r11';
    rules += ' Av6x9r11';
    rules += ' _dc11';
    if (props.size === "XL") {
        rules += ' uk11';
        rules += ' ucJ9TBTb11';
        rules += ' ud3Euai11';
        rules += ' uea11';
        rules += ' ugb11';
        rules += ' uhd11';
        rules += ' uje11';
        rules += ' u2NhKxcl11';
        rules += ' uic11';
    } else if (props.size === "L") {
        rules += ' uk11';
        rules += ' ucJ9TBTb11';
        rules += ' ud3Euai11';
        rules += ' uea11';
        rules += ' ugb11';
        rules += ' uhd11';
        rules += ' uje11';
        rules += ' u2NhKxcl11';
        rules += ' uic11';
    } else if (props.size === "S") {
        rules += ' uk11';
        rules += ' ucJ9TBTb11';
        rules += ' ud3Euai11';
        rules += ' uea11';
        rules += ' ugb11';
        rules += ' uhd11';
        rules += ' uje11';
        rules += ' u2NhKxcl11';
        rules += ' uic11';
    } else if (props.size === "XS") {
        rules += ' uk11';
        rules += ' ucJ9TBTb11';
        rules += ' ud3Euai11';
        rules += ' uea11';
        rules += ' ugb11';
        rules += ' uhd11';
        rules += ' uje11';
        rules += ' u2NhKxcl11';
        rules += ' uic11';
    } else {
        rules += ' uk11';
        rules += ' ucJ9TBTb11';
        rules += ' ud3Euai11';
        rules += ' uea11';
        rules += ' ugb11';
        rules += ' uhd11';
        rules += ' uje11';
        rules += ' u2NhKxcl11';
        rules += ' uic11';
    }
    if (props.size === "XL") {
        rules += ' -_6BNtrc-e11';
        rules += ' vx11';
    } else if (props.size === "L") {
        rules += ' -_6BNtrc-d11';
        rules += ' vx11';
    } else if (props.size === "S") {
        rules += ' -_6BNtrc-b11';
        rules += ' vx11';
    } else if (props.size === "XS") {
        rules += ' -_6BNtrc-a11';
        rules += ' vx11';
    } else {
        rules += ' -_6BNtrc-c11';
        rules += ' vx11';
    }
    if (props.size === "XL") {
        rules += ' xb11';
        rules += ' _xa11';
    } else if (props.size === "L") {
        rules += ' xb11';
        rules += ' _xa11';
    } else if (props.size === "S") {
        rules += ' xb11';
        rules += ' _xa11';
    } else if (props.size === "XS") {
        rules += ' xb11';
        rules += ' _xa11';
    } else {
        rules += ' xb11';
        rules += ' _xa11';
    }
    if (props.size === "XL") {
        rules += ' _Fd11';
        rules += ' _FnuYUweb11';
    } else if (props.size === "L") {
        rules += ' _Fd11';
        rules += ' _FnuYUweb11';
    } else if (props.size === "S") {
        rules += ' _Fd11';
        rules += ' _FnuYUweb11';
    } else if (props.size === "XS") {
        rules += ' _Fd11';
        rules += ' _FnuYUweb11';
    } else {
        rules += ' _Fd11';
        rules += ' _FnuYUweb11';
    }
    rules += ' p40ub4c11';
    rules += ' _Nc11';
    rules += ' Pc11';
    rules += ' _Yb11';
    if (props.overflowMode === "wrap") rules += ' _7b11';
    else rules += ' _7c11';
    return rules;
};
let $387d58020e2a8028$export$6d59db4903f20f7d = function anonymous(props) {
    let rules = " ";
    rules += ' z9u7zPc11';
    rules += ' y9u7zPc11';
    rules += ' B9u7zPc11';
    rules += ' A9u7zPc11';
    rules += ' _dc11';
    rules += ' _Nc11';
    rules += ' Pc11';
    rules += ' _Yb11';
    if (props.overflowMode === "wrap") rules += ' _7b11';
    else rules += ' _7c11';
    rules += ' uk11';
    rules += ' ucJ9TBTb11';
    rules += ' ud3Euai11';
    rules += ' uea11';
    rules += ' ugb11';
    rules += ' uhd11';
    rules += ' uje11';
    rules += ' u2NhKxcl11';
    rules += ' uic11';
    rules += ' -_6BNtrc-b11';
    rules += ' vx11';
    rules += ' xb11';
    rules += ' _xa11';
    rules += ' _Fd11';
    rules += ' _FnuYUweb11';
    if (props.isDisabled) rules += ' pp11';
    else {
        if (props.isPressed) rules += ' pt11';
        else if (props.isFocusVisible) rules += ' pt11';
        else if (props.isHovered) rules += ' pt11';
        else rules += ' pv11';
    }
    rules += ' Yd11';
    rules += ' Xb11';
    rules += ' _2b11';
    return rules;
};
let $387d58020e2a8028$export$31d1842a0fd736e6 = " sd11 z2U5Crc11 y2U5Crc11 B2U5Crc11 AvoofG11 _dc11 eb11";
let $387d58020e2a8028$export$1ca1ec8b29a4ce27 = " sb11 ZuUmpre11 FuUmpre11 Ht11 Hsu11 -_8sjo0b-t5ZbAob11";
let $387d58020e2a8028$var$image = " z2U5Crc11 y2U5Crc11 B2U5Crc11 AvoofG11 Ht11 Hsu11 _dc11 oa11 na11 ka11 ja11 ZC11 fa11 _Hb11";
let $387d58020e2a8028$var$actionButtonGroup = " zkG38H11 ykG38H11 BkG38H11 AvoofG11 _dc11 __Ac11 It11 Isu11";
let $387d58020e2a8028$var$listActionMenu = " z6Nrfjc11 y6Nrfjc11 B6Nrfjc11 AvoofG11 _dc11";
const $387d58020e2a8028$var$listCheckbox = function anonymous(props) {
    let rules = " ";
    rules += ' z2CW8rb11';
    rules += ' y2CW8rb11';
    rules += ' B2CW8rb11';
    rules += ' AvoofG11';
    rules += ' _dc11';
    rules += ' Hv11';
    if (props.isDisabled) rules += ' _6b11';
    else rules += ' _6c11';
    return rules;
};
const $387d58020e2a8028$var$listTrailingIcon = " znWsohc11 ynWsohc11 BnWsohc11 AvoofG11 _dc11 sd11 eb11 It11 Isu11";
const $387d58020e2a8028$var$centeredWrapper = " sd11 eb11 _Ca11 Za11 Fb11";
const $387d58020e2a8028$var$loadingSpinnerWrapper = " TuNalie11 QuNalie11 SuNalie11 RuNalie11";
const $387d58020e2a8028$var$emptyStateWrapper = " sd11 eb11 _Ca11 Za11 Fb11 _oa11 Tf11 Qf11 Sf11 Rf11";
function $387d58020e2a8028$var$ListSelectionCheckbox({ isDisabled: isDisabled }) {
    let selectionContext = (0, $jpFeb$reactariacomponents.useSlottedContext)((0, $jpFeb$reactariacomponents.CheckboxContext), 'selection');
    let isSelectionDisabled = isDisabled || !!selectionContext?.isDisabled;
    return /*#__PURE__*/ (0, $jpFeb$reactjsxruntime.jsx)("div", {
        className: $387d58020e2a8028$var$listCheckbox({
            isDisabled: isSelectionDisabled
        }),
        children: /*#__PURE__*/ (0, $jpFeb$reactjsxruntime.jsx)((0, $af04e099a53d3e85$exports.Checkbox), {
            slot: "selection"
        })
    });
}
function $387d58020e2a8028$var$isNextSelected(id, state) {
    if (id == null || !state) return false;
    let keyAfter = state.collection.getKeyAfter(id);
    return keyAfter != null && state.selectionManager.isSelected(keyAfter);
}
function $387d58020e2a8028$var$isPrevSelected(id, state) {
    if (id == null || !state) return false;
    let keyBefore = state.collection.getKeyBefore(id);
    return keyBefore != null && state.selectionManager.isSelected(keyBefore);
}
function $387d58020e2a8028$var$isFirstItem(id, state) {
    if (id == null || !state) return false;
    return state.collection.getFirstKey() === id;
}
function $387d58020e2a8028$var$isLastItem(id, state) {
    if (id == null || !state) return false;
    return state.collection.getLastKey() === id;
}
function $387d58020e2a8028$export$c6bde0c04b033c0e(props1) {
    let ref = (0, $jpFeb$react.useRef)(null);
    let { hasChildItems: hasChildItems, ...otherProps } = props1;
    let isLink = props1.href != null;
    let isLinkOut = isLink && props1.target === '_blank';
    let { isQuiet: isQuiet, selectionStyle: selectionStyle, overflowMode: overflowMode, scale: scale, hideLinkOutIcon: hideLinkOutIcon = false } = (0, $jpFeb$react.useContext)($387d58020e2a8028$var$InternalListViewContext);
    let textValue = props1.textValue || (typeof props1.children === 'string' ? props1.children : undefined);
    let { direction: direction } = (0, $jpFeb$reactaria.useLocale)();
    let hasTrailingIcon = hasChildItems || isLinkOut && !hideLinkOutIcon;
    return /*#__PURE__*/ (0, $jpFeb$reactjsxruntime.jsx)((0, $jpFeb$reactariacomponents.GridListItem), {
        ...otherProps,
        textValue: textValue,
        ref: ref,
        ...hasTrailingIcon ? {
            'data-has-trailing-icon': ''
        } : {},
        className: (renderProps)=>$387d58020e2a8028$var$listitem({
                ...renderProps,
                isLink: isLink,
                isQuiet: isQuiet,
                scale: scale,
                selectionStyle: selectionStyle,
                isPrevNotSelected: !$387d58020e2a8028$var$isPrevSelected(renderProps.id, renderProps.state),
                isNextSelected: $387d58020e2a8028$var$isNextSelected(renderProps.id, renderProps.state),
                isNextNotSelected: !$387d58020e2a8028$var$isNextSelected(renderProps.id, renderProps.state),
                isFirstItem: $387d58020e2a8028$var$isFirstItem(renderProps.id, renderProps.state),
                isLastItem: $387d58020e2a8028$var$isLastItem(renderProps.id, renderProps.state)
            }),
        children: (renderProps)=>{
            let { children: children } = props1;
            let { selectionMode: selectionMode, selectionBehavior: selectionBehavior, isDisabled: isDisabled, id: id, state: state } = renderProps;
            return /*#__PURE__*/ (0, $jpFeb$reactjsxruntime.jsxs)((0, $jpFeb$reactariacomponents.Provider), {
                values: [
                    [
                        (0, $6367bc87eb7d24ad$exports.TextContext),
                        {
                            slots: {
                                [(0, $jpFeb$reactariacomponents.DEFAULT_SLOT)]: {
                                    styles: $387d58020e2a8028$export$1237798dc640739a({
                                        ...renderProps,
                                        overflowMode: overflowMode
                                    })
                                },
                                label: {
                                    styles: $387d58020e2a8028$export$1237798dc640739a({
                                        ...renderProps,
                                        overflowMode: overflowMode
                                    })
                                },
                                description: {
                                    styles: $387d58020e2a8028$export$6d59db4903f20f7d({
                                        ...renderProps,
                                        overflowMode: overflowMode
                                    })
                                }
                            }
                        }
                    ],
                    [
                        (0, $bde97c91243ed164$exports.IconContext),
                        {
                            slots: {
                                icon: {
                                    render: (0, $e991cbcdf82ced71$exports.centerBaseline)({
                                        slot: 'icon',
                                        styles: $387d58020e2a8028$export$31d1842a0fd736e6
                                    }),
                                    styles: $387d58020e2a8028$export$1ca1ec8b29a4ce27
                                }
                            }
                        }
                    ],
                    [
                        (0, $053b76ed3d29e13b$exports.ImageContext),
                        {
                            styles: $387d58020e2a8028$var$image
                        }
                    ],
                    [
                        (0, $7a26131f6144af2b$exports.ActionButtonGroupContext),
                        {
                            styles: $387d58020e2a8028$var$actionButtonGroup,
                            size: 'S',
                            isQuiet: true
                        }
                    ],
                    [
                        (0, $e5a758dd286599f2$exports.ActionMenuContext),
                        {
                            styles: $387d58020e2a8028$var$listActionMenu,
                            isQuiet: true,
                            size: 'S',
                            isDisabled: isDisabled
                        }
                    ]
                ],
                children: [
                    /*#__PURE__*/ (0, $jpFeb$reactjsxruntime.jsx)("div", {
                        className: $387d58020e2a8028$var$listRowBackground({
                            ...renderProps,
                            selectionStyle: selectionStyle,
                            isQuiet: isQuiet,
                            isPrevSelected: $387d58020e2a8028$var$isPrevSelected(id, state),
                            isNextSelected: $387d58020e2a8028$var$isNextSelected(id, state),
                            isPrevNotSelected: !$387d58020e2a8028$var$isPrevSelected(id, state),
                            isNextNotSelected: !$387d58020e2a8028$var$isNextSelected(id, state),
                            isFirstItem: $387d58020e2a8028$var$isFirstItem(id, state),
                            isLastItem: $387d58020e2a8028$var$isLastItem(id, state)
                        })
                    }),
                    selectionMode !== 'none' && selectionBehavior === 'toggle' && /*#__PURE__*/ (0, $jpFeb$reactjsxruntime.jsx)($387d58020e2a8028$var$ListSelectionCheckbox, {
                        isDisabled: isDisabled
                    }),
                    typeof children === 'string' ? /*#__PURE__*/ (0, $jpFeb$reactjsxruntime.jsx)((0, $6367bc87eb7d24ad$exports.Text), {
                        slot: "label",
                        children: children
                    }) : children,
                    isLinkOut && !hideLinkOutIcon && /*#__PURE__*/ (0, $jpFeb$reactjsxruntime.jsx)("div", {
                        className: $387d58020e2a8028$var$listTrailingIcon,
                        children: /*#__PURE__*/ (0, $jpFeb$reactjsxruntime.jsx)((0, $377d9a1b51957cfd$exports.default), {
                            size: "M",
                            className: function anonymous(props) {
                                let rules = " ";
                                if (props.direction === "rtl") {
                                    rules += ' -Z4Pn4c-a11';
                                    rules += ' __Ha11';
                                }
                                rules += ' -_8sjo0b-t5ZbAob11';
                                return rules;
                            }({
                                direction: direction
                            })
                        })
                    }),
                    hasChildItems && !isLinkOut && /*#__PURE__*/ (0, $jpFeb$reactjsxruntime.jsx)("div", {
                        className: $387d58020e2a8028$var$listTrailingIcon,
                        children: /*#__PURE__*/ (0, $jpFeb$reactjsxruntime.jsx)((0, $1df9f1c9262ce5df$exports.default), {
                            className: function anonymous(props) {
                                let rules = " ";
                                if (props.direction === "rtl") {
                                    rules += ' -Z4Pn4c-a11';
                                    rules += ' __Ha11';
                                } else if (props.direction === "ltr") {
                                    rules += ' -Z4Pn4c-b11';
                                    rules += ' __Ha11';
                                }
                                if (props.direction === "rtl") {
                                    rules += ' -_04Pn4c-a11';
                                    rules += ' __Ha11';
                                } else if (props.direction === "ltr") {
                                    rules += ' -_04Pn4c-b11';
                                    rules += ' __Ha11';
                                }
                                rules += ' -_8sjo0b-t5ZbAob11';
                                return rules;
                            }({
                                direction: direction
                            })
                        })
                    })
                ]
            });
        }
    });
}


//# sourceMappingURL=ListView.cjs.map
