globalThis.process ??= {}; globalThis.process.env ??= {};
import { a as requireReact, r as reactExports } from './index_CBCp_CJ0.mjs';
/* empty css                          */

/******************************************************************************
Copyright (c) Microsoft Corporation.

Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */
/* global Reflect, Promise, SuppressedError, Symbol, Iterator */


function __rest(s, e) {
  var t = {};
  for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
      t[p] = s[p];
  if (s != null && typeof Object.getOwnPropertySymbols === "function")
      for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
          if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
              t[p[i]] = s[p[i]];
      }
  return t;
}

typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
  var e = new Error(message);
  return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
};

var jsxRuntime = {exports: {}};

var reactJsxRuntime_production_min = {};

/**
 * @license React
 * react-jsx-runtime.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */

var hasRequiredReactJsxRuntime_production_min;

function requireReactJsxRuntime_production_min () {
	if (hasRequiredReactJsxRuntime_production_min) return reactJsxRuntime_production_min;
	hasRequiredReactJsxRuntime_production_min = 1;
var f=requireReact(),k=Symbol.for("react.element"),l=Symbol.for("react.fragment"),m=Object.prototype.hasOwnProperty,n=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,p={key:true,ref:true,__self:true,__source:true};
	function q(c,a,g){var b,d={},e=null,h=null;void 0!==g&&(e=""+g);void 0!==a.key&&(e=""+a.key);void 0!==a.ref&&(h=a.ref);for(b in a)m.call(a,b)&&!p.hasOwnProperty(b)&&(d[b]=a[b]);if(c&&c.defaultProps)for(b in a=c.defaultProps,a) void 0===d[b]&&(d[b]=a[b]);return {$$typeof:k,type:c,key:e,ref:h,props:d,_owner:n.current}}reactJsxRuntime_production_min.Fragment=l;reactJsxRuntime_production_min.jsx=q;reactJsxRuntime_production_min.jsxs=q;
	return reactJsxRuntime_production_min;
}

var hasRequiredJsxRuntime;

function requireJsxRuntime () {
	if (hasRequiredJsxRuntime) return jsxRuntime.exports;
	hasRequiredJsxRuntime = 1;
	{
	  jsxRuntime.exports = requireReactJsxRuntime_production_min();
	}
	return jsxRuntime.exports;
}

var jsxRuntimeExports = requireJsxRuntime();

/** Joins args into a className string
 *
 * @param {any} args list of objects, string, or arrays to reduce
 */
function css(...args) {
    // Adapted from https://github.com/JedWatson/classnames/blob/master/index.js
    const classes = [];
    const hasOwn = {}.hasOwnProperty;
    args.filter(Boolean).forEach((arg) => {
        const argType = typeof arg;
        if (argType === 'string' || argType === 'number') {
            classes.push(arg);
        }
        else if (Array.isArray(arg) && arg.length) {
            const inner = css(...arg);
            if (inner) {
                classes.push(inner);
            }
        }
        else if (argType === 'object') {
            for (const key in arg) {
                if (hasOwn.call(arg, key) && arg[key]) {
                    classes.push(key);
                }
            }
        }
    });
    return classes.join(' ');
}

const t_global_breakpoint_sm = {
  "value": "36rem"};

const t_global_breakpoint_md = {
  "value": "48rem"};

const t_global_breakpoint_lg = {
  "value": "62rem"};

const t_global_breakpoint_xl = {
  "value": "75rem"};

const t_global_breakpoint_2xl = {
  "value": "90.625rem"};

const t_global_breakpoint_height_sm = {
  "value": "0rem"};

const t_global_breakpoint_height_md = {
  "value": "40rem"};

const t_global_breakpoint_height_lg = {
  "value": "48rem"};

const t_global_breakpoint_height_xl = {
  "value": "60rem"};

const t_global_breakpoint_height_2xl = {
  "value": "80rem"};

let currentId = 0;
/**
 * Factory to create Icon class components for consumers
 */
function createIcon({ name, xOffset = 0, yOffset = 0, width, height, svgPath }) {
    var _a;
    return _a = class SVGIcon extends reactExports.Component {
            constructor() {
                super(...arguments);
                this.id = `icon-title-${currentId++}`;
            }
            render() {
                const _b = this.props, { title, className } = _b, props = __rest(_b, ["title", "className"]);
                const classes = className ? `pf-v6-svg ${className}` : 'pf-v6-svg';
                const hasTitle = Boolean(title);
                const viewBox = [xOffset, yOffset, width, height].join(' ');
                return (jsxRuntimeExports.jsxs("svg", Object.assign({ className: classes, viewBox: viewBox, fill: "currentColor", "aria-labelledby": hasTitle ? this.id : null, "aria-hidden": hasTitle ? null : true, role: "img", width: "1em", height: "1em" }, props, { children: [hasTitle && jsxRuntimeExports.jsx("title", { id: this.id, children: title }), jsxRuntimeExports.jsx("path", { d: svgPath })] })));
            }
        },
        _a.displayName = name,
        _a;
}

const CheckCircleIconConfig = {
  name: 'CheckCircleIcon',
  height: 512,
  width: 512,
  svgPath: 'M504 256c0 136.967-111.033 248-248 248S8 392.967 8 256 119.033 8 256 8s248 111.033 248 248zM227.314 387.314l184-184c6.248-6.248 6.248-16.379 0-22.627l-22.627-22.627c-6.248-6.249-16.379-6.249-22.628 0L216 308.118l-70.059-70.059c-6.248-6.248-16.379-6.248-22.628 0l-22.627 22.627c-6.248 6.248-6.248 16.379 0 22.627l104 104c6.249 6.249 16.379 6.249 22.628.001z',
  yOffset: 0,
  xOffset: 0,
};

const CheckCircleIcon = createIcon(CheckCircleIconConfig);

const ExclamationCircleIconConfig = {
  name: 'ExclamationCircleIcon',
  height: 512,
  width: 512,
  svgPath: 'M504 256c0 136.997-111.043 248-248 248S8 392.997 8 256C8 119.083 119.043 8 256 8s248 111.083 248 248zm-248 50c-25.405 0-46 20.595-46 46s20.595 46 46 46 46-20.595 46-46-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z',
  yOffset: 0,
  xOffset: 0,
};

const ExclamationCircleIcon = createIcon(ExclamationCircleIconConfig);

const ExclamationTriangleIconConfig = {
  name: 'ExclamationTriangleIcon',
  height: 512,
  width: 576,
  svgPath: 'M569.517 440.013C587.975 472.007 564.806 512 527.94 512H48.054c-36.937 0-59.999-40.055-41.577-71.987L246.423 23.985c18.467-32.009 64.72-31.951 83.154 0l239.94 416.028zM288 354c-25.405 0-46 20.595-46 46s20.595 46 46 46 46-20.595 46-46-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z',
  yOffset: 0,
  xOffset: 0,
};

const ExclamationTriangleIcon = createIcon(ExclamationTriangleIconConfig);

const InfoCircleIconConfig = {
  name: 'InfoCircleIcon',
  height: 512,
  width: 512,
  svgPath: 'M256 8C119.043 8 8 119.083 8 256c0 136.997 111.043 248 248 248s248-111.003 248-248C504 119.083 392.957 8 256 8zm0 110c23.196 0 42 18.804 42 42s-18.804 42-42 42-42-18.804-42-42 18.804-42 42-42zm56 254c0 6.627-5.373 12-12 12h-88c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h12v-64h-12c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h64c6.627 0 12 5.373 12 12v100h12c6.627 0 12 5.373 12 12v24z',
  yOffset: 0,
  xOffset: 0,
};

const InfoCircleIcon = createIcon(InfoCircleIconConfig);

const BellIconConfig = {
  name: 'BellIcon',
  height: 1024,
  width: 896,
  svgPath: 'M448,0 C465.333333,0 480.333333,6.33333333 493,19 C505.666667,31.6666667 512,46.6666667 512,64 L512,106 L514.23,106.45 C587.89,121.39 648.48,157.24 696,214 C744,271.333333 768,338.666667 768,416 C768,500 780,568.666667 804,622 C818.666667,652.666667 841.333333,684 872,716 C873.773676,718.829136 875.780658,721.505113 878,724 C890,737.333333 896,752.333333 896,769 C896,785.666667 890,800.333333 878,813 C866,825.666667 850.666667,832 832,832 L63.3,832 C44.9533333,831.84 29.8533333,825.506667 18,813 C6,800.333333 0,785.666667 0,769 C0,752.333333 6,737.333333 18,724 L24,716 L25.06,714.9 C55.1933333,683.28 77.5066667,652.313333 92,622 C116,568.666667 128,500 128,416 C128,338.666667 152,271.333333 200,214 C248,156.666667 309.333333,120.666667 384,106 L384,63.31 C384.166667,46.27 390.5,31.5 403,19 C415.666667,6.33333333 430.666667,0 448,0 Z M576,896 L576,897.08 C575.74,932.6 563.073333,962.573333 538,987 C512.666667,1011.66667 482.666667,1024 448,1024 C413.333333,1024 383.333333,1011.66667 358,987 C332.666667,962.333333 320,932 320,896 L576,896 Z',
  yOffset: 0,
  xOffset: 0,
};

const BellIcon = createIcon(BellIconConfig);

var ValidatedOptions;
(function (ValidatedOptions) {
    ValidatedOptions["success"] = "success";
    ValidatedOptions["error"] = "error";
    ValidatedOptions["warning"] = "warning";
    ValidatedOptions["default"] = "default";
})(ValidatedOptions || (ValidatedOptions = {}));
const KeyTypes = {
    Space: ' ',
    Escape: 'Escape',
    Enter: 'Enter'};
const globalWidthBreakpoints = {
    sm: parseInt(t_global_breakpoint_sm.value) * 16,
    md: parseInt(t_global_breakpoint_md.value) * 16,
    lg: parseInt(t_global_breakpoint_lg.value) * 16,
    xl: parseInt(t_global_breakpoint_xl.value) * 16,
    '2xl': parseInt(t_global_breakpoint_2xl.value) * 16
};
const globalHeightBreakpoints = {
    sm: parseInt(t_global_breakpoint_height_sm.value) * 16,
    md: parseInt(t_global_breakpoint_height_md.value) * 16,
    lg: parseInt(t_global_breakpoint_height_lg.value) * 16,
    xl: parseInt(t_global_breakpoint_height_xl.value) * 16,
    '2xl': parseInt(t_global_breakpoint_height_2xl.value) * 16
};
const statusIcons = {
    success: CheckCircleIcon,
    danger: ExclamationCircleIcon,
    warning: ExclamationTriangleIcon,
    info: InfoCircleIcon,
    custom: BellIcon
};

/**
 * @param {string} prefix - String to prefix ID with
 */
function getUniqueId(prefix = 'pf') {
    const uid = new Date().getTime() + Math.random().toString(36).slice(2);
    return `${prefix}-${uid}`;
}
/**
 * This function is a helper for turning arrays of breakpointMod objects for flex and grid into style object
 *
 * @param {object} mods The modifiers object
 * @param {string} css-variable The appropriate css variable for the component
 */
const setBreakpointCssVars = (mods, cssVar) => Object.entries(mods || {}).reduce((acc, [breakpoint, value]) => breakpoint === 'default' ? Object.assign(Object.assign({}, acc), { [cssVar]: value }) : Object.assign(Object.assign({}, acc), { [`${cssVar}-on-${breakpoint}`]: value }), {});
/**
 * This function is a helper for turning arrays of breakpointMod objects for data toolbar and flex into classes
 *
 * @param {object} mods The modifiers object
 * @param {any} styles The appropriate styles object for the component
 */
const formatBreakpointMods = (mods, styles, stylePrefix = '', breakpoint, vertical) => {
    if (!mods) {
        return '';
    }
    if (breakpoint && !vertical) {
        if (breakpoint in mods) {
            return styles.modifiers[toCamel(`${stylePrefix}${mods[breakpoint]}`)];
        }
        // the current breakpoint is not specified in mods, so we try to find the next nearest
        const breakpointsOrder = ['2xl', 'xl', 'lg', 'md', 'sm', 'default'];
        const breakpointsIndex = breakpointsOrder.indexOf(breakpoint);
        for (let i = breakpointsIndex; i < breakpointsOrder.length; i++) {
            if (breakpointsOrder[i] in mods) {
                return styles.modifiers[toCamel(`${stylePrefix}${mods[breakpointsOrder[i]]}`)];
            }
        }
        return '';
    }
    return Object.entries(mods || {})
        .map(([breakpoint, mod]) => `${stylePrefix}${mod}${breakpoint !== 'default' ? `-on-${breakpoint}` : ''}${vertical && breakpoint !== 'default' ? '-height' : ''}`)
        .map(toCamel)
        .map((mod) => mod.replace(/-?(\dxl)/gi, (_res, group) => `_${group}`))
        .map((modifierKey) => styles.modifiers[modifierKey])
        .filter(Boolean)
        .join(' ');
};
/**
 * Return the breakpoint for the given height
 *
 * @param {number | null} height The height to check
 * @returns {'default' | 'sm' | 'md' | 'lg' | 'xl' | '2xl'} The breakpoint
 */
const getVerticalBreakpoint = (height) => {
    if (height === null) {
        return null;
    }
    if (height >= globalHeightBreakpoints['2xl']) {
        return '2xl';
    }
    if (height >= globalHeightBreakpoints.xl) {
        return 'xl';
    }
    if (height >= globalHeightBreakpoints.lg) {
        return 'lg';
    }
    if (height >= globalHeightBreakpoints.md) {
        return 'md';
    }
    if (height >= globalHeightBreakpoints.sm) {
        return 'sm';
    }
    return 'default';
};
/**
 * Return the breakpoint for the given width
 *
 * @param {number | null} width The width to check
 * @returns {'default' | 'sm' | 'md' | 'lg' | 'xl' | '2xl'} The breakpoint
 */
const getBreakpoint = (width) => {
    if (width === null) {
        return null;
    }
    if (width >= globalWidthBreakpoints['2xl']) {
        return '2xl';
    }
    if (width >= globalWidthBreakpoints.xl) {
        return 'xl';
    }
    if (width >= globalWidthBreakpoints.lg) {
        return 'lg';
    }
    if (width >= globalWidthBreakpoints.md) {
        return 'md';
    }
    if (width >= globalWidthBreakpoints.sm) {
        return 'sm';
    }
    return 'default';
};
const camelize = (s) => s.toUpperCase().replace('-', '').replace('_', '');
/**
 *
 * @param {string} s string to make camelCased
 */
const toCamel = (s) => s.replace(/([-_][a-z])/gi, camelize);
/**
 * Copied from exenv
 */
const canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement);
/**
 * Calculate the width of the text
 * Example:
 * getTextWidth('my text', node)
 *
 * @param {string} text The text to calculate the width for
 * @param {HTMLElement} node The HTML element
 */
const getTextWidth = (text, node) => {
    const computedStyle = getComputedStyle(node);
    // Firefox returns the empty string for .font, so this function creates the .font property manually
    const getFontFromComputedStyle = () => {
        let computedFont = '';
        // Firefox uses percentages for font-stretch, but Canvas does not accept percentages
        // so convert to keywords, as listed at:
        // https://developer.mozilla.org/en-US/docs/Web/CSS/font-stretch
        const fontStretchLookupTable = {
            '50%': 'ultra-condensed',
            '62.5%': 'extra-condensed',
            '75%': 'condensed',
            '87.5%': 'semi-condensed',
            '100%': 'normal',
            '112.5%': 'semi-expanded',
            '125%': 'expanded',
            '150%': 'extra-expanded',
            '200%': 'ultra-expanded'
        };
        // If the retrieved font-stretch percentage isn't found in the lookup table, use
        // 'normal' as a last resort.
        let fontStretch;
        if (computedStyle.fontStretch in fontStretchLookupTable) {
            fontStretch = fontStretchLookupTable[computedStyle.fontStretch];
        }
        else {
            fontStretch = 'normal';
        }
        computedFont =
            computedStyle.fontStyle +
                ' ' +
                computedStyle.fontVariant +
                ' ' +
                computedStyle.fontWeight +
                ' ' +
                fontStretch +
                ' ' +
                computedStyle.fontSize +
                '/' +
                computedStyle.lineHeight +
                ' ' +
                computedStyle.fontFamily;
        return computedFont;
    };
    const canvas = document.createElement('canvas');
    const context = canvas.getContext('2d');
    context.font = computedStyle.font || getFontFromComputedStyle();
    return context.measureText(text).width;
};
/**
 * Get the inner dimensions of an element
 *
 * @param {HTMLElement} node HTML element to calculate the inner dimensions for
 */
const innerDimensions = (node) => {
    const computedStyle = getComputedStyle(node);
    let width = node.clientWidth; // width with padding
    let height = node.clientHeight; // height with padding
    height -= parseFloat(computedStyle.paddingTop) + parseFloat(computedStyle.paddingBottom);
    width -= parseFloat(computedStyle.paddingLeft) + parseFloat(computedStyle.paddingRight);
    return { height, width };
};
/**
 * This function is a helper for truncating text content on the left, leaving the right side of the content in view
 *
 * @param {HTMLElement} node HTML element
 * @param {string} value The original text value
 */
const trimLeft = (node, value) => {
    const availableWidth = innerDimensions(node).width;
    let newValue = value;
    if (getTextWidth(value, node) > availableWidth) {
        // we have text overflow, trim the text to the left and add ... in the front until it fits
        while (getTextWidth(`...${newValue}`, node) > availableWidth) {
            newValue = newValue.substring(1);
        }
        // replace text with our truncated text
        if (node.value) {
            node.value = `...${newValue}`;
        }
        else {
            node.innerText = `...${newValue}`;
        }
    }
    else {
        if (node.value) {
            node.value = value;
        }
        else {
            node.innerText = value;
        }
    }
};
/**
 * @param {React.RefObject<any>[]} timeoutRefs - Timeout refs to clear
 */
const clearTimeouts = (timeoutRefs) => {
    timeoutRefs.forEach((ref) => {
        if (ref.current) {
            clearTimeout(ref.current);
        }
    });
};
/**
 * Helper function to get the language direction of a given element, useful for figuring out if left-to-right
 * or right-to-left specific logic should be applied.
 *
 * @param {HTMLElement} targetElement  - Element the helper will get the language direction of
 * @param {'ltr' | 'rtl'} defaultDirection - Language direction to assume if one can't be determined, defaults to 'ltr'
 * @returns {'ltr' | 'rtl'} - The language direction of the target element
 */
const getLanguageDirection = (targetElement, defaultDirection = 'ltr') => {
    if (!targetElement) {
        return defaultDirection;
    }
    const computedDirection = getComputedStyle(targetElement).getPropertyValue('direction');
    if (['ltr', 'rtl'].includes(computedDirection)) {
        return computedDirection;
    }
    return defaultDirection;
};

let uid = 0;
const ouiaPrefix = 'OUIA-Generated-';
const ouiaIdByRoute = {};
/** Get props to conform to OUIA spec
 *
 * For functional components, use the useOUIAProps function instead
 *
 * In class based components, create a state variable ouiaStateId to create a static generated ID:
 * state = {
 *  ouiaStateId: getDefaultOUIAId(Chip.displayName)
 * }
 * This generated ID should remain alive as long as the component is not unmounted.
 *
 * Then add the attributes to the component
 * {...getOUIAProps('OverflowChip', this.props.ouiaId !== undefined ? this.props.ouiaId : this.state.ouiaStateId)}
 *
 * @param {string} componentType OUIA component type
 * @param {number|string} id OUIA component id
 * @param {boolean} ouiaSafe false if in animation
 */
function getOUIAProps(componentType, id, ouiaSafe = true) {
    return {
        'data-ouia-component-type': `PF6/${componentType}`,
        'data-ouia-safe': ouiaSafe,
        'data-ouia-component-id': id
    };
}
/**
 * Hooks version of the getOUIAProps function that also memoizes the generated ID
 * Can only be used in functional components
 *
 * @param {string} componentType OUIA component type
 * @param {number|string} id OUIA component id
 * @param {boolean} ouiaSafe false if in animation
 * @param {string} variant Optional variant to add to the generated ID
 */
const useOUIAProps = (componentType, id, ouiaSafe = true, variant) => ({
    'data-ouia-component-type': `PF6/${componentType}`,
    'data-ouia-safe': ouiaSafe,
    'data-ouia-component-id': useOUIAId(componentType, id, variant)
});
/**
 * Returns the ID or the memoized generated ID
 *
 * @param {string} componentType OUIA component type
 * @param {number|string} id OUIA component id
 * @param {string} variant Optional variant to add to the generated ID
 */
const useOUIAId = (componentType, id, variant) => {
    const defaultOUIAId = reactExports.useMemo(() => getDefaultOUIAId(componentType, variant), [componentType, variant]);
    return id !== null && id !== void 0 ? id : defaultOUIAId;
};
/**
 * Returns a generated id based on the URL location
 *
 * @param {string} componentType OUIA component type
 * @param {string} variant Optional variant to add to the generated ID
 */
function getDefaultOUIAId(componentType, variant) {
    /*
    ouiaIdByRoute = {
      [route+componentType]: [number]
    }
    */
    try {
        let key;
        if (typeof window !== 'undefined') {
            // browser environments
            key = `${window.location.href}-${componentType}-${variant || ''}`;
        }
        else {
            // node/SSR environments
            key = `${componentType}-${variant || ''}`;
        }
        if (!ouiaIdByRoute[key]) {
            ouiaIdByRoute[key] = 0;
        }
        return `${ouiaPrefix}${componentType}-${variant ? `${variant}-` : ''}${++ouiaIdByRoute[key]}`;
    }
    catch (exception) {
        return `${ouiaPrefix}${componentType}-${variant ? `${variant}-` : ''}${++uid}`;
    }
}

const styles$2 = {
  "button": "pf-v6-c-button",
  "buttonCount": "pf-v6-c-button__count",
  "buttonIcon": "pf-v6-c-button__icon",
  "buttonProgress": "pf-v6-c-button__progress",
  "modifiers": {
    "primary": "pf-m-primary",
    "unread": "pf-m-unread",
    "secondary": "pf-m-secondary",
    "danger": "pf-m-danger",
    "tertiary": "pf-m-tertiary",
    "link": "pf-m-link",
    "inline": "pf-m-inline",
    "displayLg": "pf-m-display-lg",
    "warning": "pf-m-warning",
    "control": "pf-m-control",
    "stateful": "pf-m-stateful",
    "read": "pf-m-read",
    "attention": "pf-m-attention",
    "plain": "pf-m-plain",
    "noPadding": "pf-m-no-padding",
    "block": "pf-m-block",
    "small": "pf-m-small",
    "favorite": "pf-m-favorite",
    "favorited": "pf-m-favorited",
    "clicked": "pf-m-clicked",
    "disabled": "pf-m-disabled",
    "ariaDisabled": "pf-m-aria-disabled",
    "progress": "pf-m-progress",
    "inProgress": "pf-m-in-progress",
    "notify": "pf-m-notify",
    "start": "pf-m-start",
    "end": "pf-m-end"
  }};

const styles$1 = {
  "modifiers": {
    "inline": "pf-m-inline",
    "sm": "pf-m-sm",
    "md": "pf-m-md",
    "lg": "pf-m-lg",
    "xl": "pf-m-xl"
  },
  "spinner": "pf-v6-c-spinner",
  "spinnerPath": "pf-v6-c-spinner__path"
};

const c_spinner_diameter = {
  "name": "--pf-v6-c-spinner--diameter"};

var spinnerSize;
(function (spinnerSize) {
    spinnerSize["sm"] = "sm";
    spinnerSize["md"] = "md";
    spinnerSize["lg"] = "lg";
    spinnerSize["xl"] = "xl";
})(spinnerSize || (spinnerSize = {}));
const Spinner = (_a) => {
    var { className = '', size = 'xl', 'aria-valuetext': ariaValueText = 'Loading...', diameter, isInline = false, 'aria-label': ariaLabel, 'aria-labelledBy': ariaLabelledBy } = _a, props = __rest(_a, ["className", "size", 'aria-valuetext', "diameter", "isInline", 'aria-label', 'aria-labelledBy']);
    return (jsxRuntimeExports.jsx("svg", Object.assign({ className: css(styles$1.spinner, isInline ? styles$1.modifiers.inline : styles$1.modifiers[size], className), role: "progressbar", "aria-valuetext": ariaValueText, viewBox: "0 0 100 100" }, (diameter && { style: { [c_spinner_diameter.name]: diameter } }), (ariaLabel && { 'aria-label': ariaLabel }), (ariaLabelledBy && { 'aria-labelledBy': ariaLabelledBy }), (!ariaLabel && !ariaLabelledBy && { 'aria-label': 'Contents' }), props, { children: jsxRuntimeExports.jsx("circle", { className: styles$1.spinnerPath, cx: "50", cy: "50", r: "45", fill: "none" }) })));
};
Spinner.displayName = 'Spinner';

const styles = {
  "badge": "pf-v6-c-badge",
  "modifiers": {
    "read": "pf-m-read",
    "unread": "pf-m-unread",
    "disabled": "pf-m-disabled"
  }
};

const Badge = (_a) => {
    var { isRead = false, isDisabled = false, className = '', children = '', screenReaderText } = _a, props = __rest(_a, ["isRead", "isDisabled", "className", "children", "screenReaderText"]);
    return (jsxRuntimeExports.jsxs("span", Object.assign({}, props, { className: css(styles.badge, (isRead ? styles.modifiers.read : styles.modifiers.unread), isDisabled && styles.modifiers.disabled, className), children: [children, screenReaderText && jsxRuntimeExports.jsx("span", { className: "pf-v6-screen-reader", children: screenReaderText })] })));
};
Badge.displayName = 'Badge';

var ButtonVariant;
(function (ButtonVariant) {
    ButtonVariant["primary"] = "primary";
    ButtonVariant["secondary"] = "secondary";
    ButtonVariant["tertiary"] = "tertiary";
    ButtonVariant["danger"] = "danger";
    ButtonVariant["warning"] = "warning";
    ButtonVariant["link"] = "link";
    ButtonVariant["plain"] = "plain";
    ButtonVariant["control"] = "control";
    ButtonVariant["stateful"] = "stateful";
})(ButtonVariant || (ButtonVariant = {}));
var ButtonType;
(function (ButtonType) {
    ButtonType["button"] = "button";
    ButtonType["submit"] = "submit";
    ButtonType["reset"] = "reset";
})(ButtonType || (ButtonType = {}));
var ButtonSize;
(function (ButtonSize) {
    ButtonSize["default"] = "default";
    ButtonSize["sm"] = "sm";
    ButtonSize["lg"] = "lg";
})(ButtonSize || (ButtonSize = {}));
var ButtonState;
(function (ButtonState) {
    ButtonState["read"] = "read";
    ButtonState["unread"] = "unread";
    ButtonState["attention"] = "attention";
})(ButtonState || (ButtonState = {}));
const ButtonBase = (_a) => {
    var { children = null, className = '', component = 'button', isClicked = false, isBlock = false, isDisabled = false, isAriaDisabled = false, isLoading = null, isDanger = false, spinnerAriaValueText, spinnerAriaLabelledBy, spinnerAriaLabel, size = ButtonSize.default, inoperableEvents = ['onClick', 'onKeyPress'], isInline = false, type = ButtonType.button, variant = ButtonVariant.primary, state = ButtonState.unread, hasNoPadding = false, iconPosition = 'start', 'aria-label': ariaLabel = null, icon = null, role, ouiaId, ouiaSafe = true, tabIndex = null, innerRef, countOptions } = _a, props = __rest(_a, ["children", "className", "component", "isClicked", "isBlock", "isDisabled", "isAriaDisabled", "isLoading", "isDanger", "spinnerAriaValueText", "spinnerAriaLabelledBy", "spinnerAriaLabel", "size", "inoperableEvents", "isInline", "type", "variant", "state", "hasNoPadding", "iconPosition", 'aria-label', "icon", "role", "ouiaId", "ouiaSafe", "tabIndex", "innerRef", "countOptions"]);
    const ouiaProps = useOUIAProps(Button.displayName, ouiaId, ouiaSafe, variant);
    const Component = component;
    const isButtonElement = Component === 'button';
    const isInlineSpan = isInline && Component === 'span';
    const isIconAlignedAtEnd = iconPosition === 'end' || iconPosition === 'right';
    const preventedEvents = inoperableEvents.reduce((handlers, eventToPrevent) => (Object.assign(Object.assign({}, handlers), { [eventToPrevent]: (event) => {
            event.preventDefault();
        } })), {});
    const getDefaultTabIdx = () => {
        if (isDisabled) {
            return isButtonElement ? null : -1;
        }
        else if (isAriaDisabled) {
            return null;
        }
        else if (isInlineSpan) {
            return 0;
        }
    };
    const _icon = icon && (jsxRuntimeExports.jsx("span", { className: css(styles$2.buttonIcon, children && styles$2.modifiers[isIconAlignedAtEnd ? 'end' : 'start']), children: icon }));
    const _children = children && jsxRuntimeExports.jsx("span", { className: css('pf-v6-c-button__text'), children: children });
    // We only want to render the aria-disabled attribute when true, similar to the disabled attribute natively.
    const shouldRenderAriaDisabled = isAriaDisabled || (!isButtonElement && isDisabled);
    return (jsxRuntimeExports.jsxs(Component, Object.assign({}, props, (isAriaDisabled ? preventedEvents : null), (shouldRenderAriaDisabled && { 'aria-disabled': true }), { "aria-label": ariaLabel, className: css(styles$2.button, styles$2.modifiers[variant], isBlock && styles$2.modifiers.block, isDisabled && !isButtonElement && styles$2.modifiers.disabled, isAriaDisabled && styles$2.modifiers.ariaDisabled, isClicked && styles$2.modifiers.clicked, isInline && variant === ButtonVariant.link && styles$2.modifiers.inline, isDanger && (variant === ButtonVariant.secondary || variant === ButtonVariant.link) && styles$2.modifiers.danger, isLoading !== null && variant !== ButtonVariant.plain && styles$2.modifiers.progress, isLoading && styles$2.modifiers.inProgress, hasNoPadding && variant === ButtonVariant.plain && styles$2.modifiers.noPadding, variant === ButtonVariant.stateful && styles$2.modifiers[state], size === ButtonSize.sm && styles$2.modifiers.small, size === ButtonSize.lg && styles$2.modifiers.displayLg, className), disabled: isButtonElement ? isDisabled : null, tabIndex: tabIndex !== null ? tabIndex : getDefaultTabIdx(), type: isButtonElement || isInlineSpan ? type : null, role: isInlineSpan ? 'button' : role, ref: innerRef }, ouiaProps, { children: [isLoading && (jsxRuntimeExports.jsx("span", { className: css(styles$2.buttonProgress), children: jsxRuntimeExports.jsx(Spinner, { size: spinnerSize.md, isInline: isInline, "aria-valuetext": spinnerAriaValueText, "aria-label": spinnerAriaLabel, "aria-labelledby": spinnerAriaLabelledBy }) })), isIconAlignedAtEnd ? (jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [_children, _icon] })) : (jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [_icon, _children] })), countOptions && (jsxRuntimeExports.jsx("span", { className: css(styles$2.buttonCount, countOptions.className), children: jsxRuntimeExports.jsx(Badge, { isRead: countOptions.isRead, isDisabled: isDisabled, children: countOptions.count }) }))] })));
};
const Button = reactExports.forwardRef((props, ref) => jsxRuntimeExports.jsx(ButtonBase, Object.assign({ innerRef: ref }, props)));
Button.displayName = 'Button';

export { Button as B, CheckCircleIcon as C, ExclamationTriangleIcon as E, InfoCircleIcon as I, KeyTypes as K, Spinner as S, ValidatedOptions as V, __rest as _, canUseDOM as a, createIcon as b, css as c, ExclamationCircleIcon as d, getOUIAProps as e, statusIcons as f, getDefaultOUIAId as g, ButtonVariant as h, Badge as i, jsxRuntimeExports as j, getVerticalBreakpoint as k, getBreakpoint as l, formatBreakpointMods as m, t_global_breakpoint_2xl as n, t_global_breakpoint_xl as o, t_global_breakpoint_lg as p, t_global_breakpoint_md as q, toCamel as r, setBreakpointCssVars as s, trimLeft as t, useOUIAProps as u, getUniqueId as v, BellIcon as w, getLanguageDirection as x, clearTimeouts as y };
