/* @oracle/oraclejet-preact: undefined */
import { jsx, jsxs, Fragment } from 'preact/jsx-runtime';
import { y as getCumulativeSeries, t as getSeriesData, l as getLineAreaSegments, o as findNearestDataPoint, p as getStartAndEndAxesOffset, s as getMarkers } from './utils-24c54d43.js';
import { A as AreaSeries, L as LineSeries } from './ReferenceLineArea-53129f72.js';
import { M as MarkersWithLabel } from './MarkersWithLabel-a838355c.js';
import { e as getLineAreaChartNavUtil, d as getItemColor, f as getMarkerType } from './dataStyleUtils-82159c06.js';
import { u as useUser } from './useUser-06d34d19.js';
import { g as getColorRamp } from './colorUtils-77b8874f.js';
import './accUtils-9d5183c4.js';
import { c as colorSchemeVars } from './themeContract.css-1ffed3bf.js';
import { g as getLineAreaChartItemPosition } from './chartUtils-edefe22f.js';
import { forwardRef } from 'preact/compat';
import { C as Chart } from './Chart-8c63da28.js';
import './utils-b1eb54f9.js';
import './colorUtils-b3804ee8.js';
import './_curry1-63949a9b.js';
import './getLocale-1c41e86a.js';
import './stringUtils-0fe25200.js';
import './labelUtils-e347bdbe.js';
import './textUtils-3ed25dd1.js';
import './utils-49903d04.js';
import './datatipUtils-0a36125e.js';
import './clientUtils-cccff45f.js';
import './clientHints-a42b510c.js';
import './dimensionUtils-6d5dac30.js';
import './scale-9a834124.js';
import './PRIVATE_PlotArea/themes/PlotAreaStyles.css.js';
import './PlotAreaStyles.styles.css';
import './hooks/PRIVATE_useVisDnd/themes/VisDndStyles.css.js';
import './VisDndStyles.styles.css';
import './classNames-4e12b00d.js';
import './useColorScheme-c4f6caab.js';
import 'preact/hooks';
import './LayerHost-7931b424.js';
import './index-aec1cc7f.js';
import 'preact';
import './UNSAFE_Layer/themes/LayerHostStyles.css.js';
import './LayerHostStyles.styles.css';
import './lineUtils-87255164.js';
import './PRIVATE_Chart/themes/ChartStyles.css.js';
import './ChartStyles.styles.css';
import './Marker-81aae9f0.js';
import './SvgShapesStyles.styles.css';
import './TrackResizeContainer-3d7b18b7.js';
import './useSize-3b5c56f5.js';
import './useResizeObserver-13641643.js';
import './useAddBusyState-7a6af61f.js';
import './BusyStateContext-9ee9751d.js';
import './useBusyStateContext-4d3c27c0.js';
import './unsafeDomAccess-453eb74e.js';
import './size-af1e638c.js';
import './UNSAFE_visErrors.js';
import './useTextDimensions-45f79df4.js';
import './useCssVars-bc2527ac.js';
import './useTheme-0e7497db.js';
import './useScale-434ad939.js';
import './useId-03dbfdf0.js';
import './Axis-e23d7b41.js';
import './PRIVATE_Axis/themes/AxisStyles.css.js';
import './AxisStyles.styles.css';
import './MultilineText-c7d80332.js';
import './PRIVATE_Axis/themes/redwood/AxisTheme.js';
import './PRIVATE_Axis/themes/redwood/AxisBaseTheme.css.js';
import './PRIVATE_Axis/themes/redwood/AxisBaseTheme.styles.css';
import './PRIVATE_Axis/themes/redwood/AxisVariants.css.js';
import './vanilla-extract-recipes-createRuntimeFn.esm-2aaf8c98.js';
import './useComponentTheme-d2f9e47f.js';
import './logger-c92f309c.js';
import './useChartViewport-03efd960.js';
import './eventsUtils-14cb0a49.js';
import './usePinch-301da5f6.js';
import './usePointerGesture-ddf231cc.js';
import './mergeProps-88ea8306.js';
import './useChartNav-49b52017.js';
import './layoutUtils-ec5be703.js';
import './useVisHover-d7a0b2f3.js';
import './ScrollBar-c7a5d361.js';
import './PRIVATE_ChartScrollBar/themes/ScrollBarStyles.css.js';
import './ScrollBarStyles.styles.css';
import './useSelectDrill-f669e729.js';
import './useChartDataCursor-f79f98ec.js';
import './hooks/PRIVATE_useChartDataCursor/themes/DataCursorStyles.css.js';
import './DataCursorStyles.styles.css';
import './useChartDatatip-8dd22b71.js';
import './useDatatip-4895a07a.js';
import './Layer-535577b5.js';
import './UNSAFE_Layer/themes/LayerStyles.css.js';
import './LayerStyles.styles.css';
import './useThemeInterpolations-e144e8ec.js';
import './theme-63551f30.js';
import './Theme-e6dec6db.js';
import './mergeInterpolations-30cd9a69.js';
import './mergeDeepWithKey-33e3d1be.js';
import './_curry3-577eb45e.js';
import './_curry2-01c87f61.js';
import './_isObject-1fab0f5b.js';
import './useDensity-1acb0153.js';
import './Floating-4a82db94.js';
import './useFloating-b9d680f7.js';
import './positionUtils-f26caad9.js';
import './refUtils-76275c69.js';
import './useOutsideClick-b777a43e.js';
import './arrayUtils-35a58161.js';
import './useModal-953082f2.js';
import './UNSAFE_Floating/themes/redwood/FloatingTheme.js';
import './UNSAFE_Floating/themes/FloatingStyles.css.js';
import './FloatingStyles.styles.css';
import './UNSAFE_Floating/themes/redwood/FloatingBaseTheme.css.js';
import './UNSAFE_Floating/themes/redwood/FloatingBaseTheme.styles.css';
import './UNSAFE_Floating/themes/redwood/FloatingVariants.css.js';
import './vanilla-extract-dynamic.esm-c909758c.js';
import './UNSAFE_Floating/themes/FloatingContract.css.js';
import './useUnsafeDomElementRef-32290273.js';
import './hooks/PRIVATE_useDatatip/themes/useDatatip.css.js';
import './useDatatip.styles.css';
import './VisTabularDatatip-85b00c1b.js';
import './PRIVATE_VisTabularDatatip/themes/VisTabularDatatipStyles.css.js';
import './VisTabularDatatipStyles.styles.css';
import './useChartDrill-e3b9ede4.js';
import './useVisDrill-04536d3b.js';
import './useDoubleTap-4e290707.js';
import './clientUtils-71f2dbaf.js';
import './useSelection-82bec039.js';
import './BaseButton-41068c85.js';
import './useHover-85077adb.js';
import './useToggle-8b7fcefe.js';
import './useActive-fb6d4d52.js';
import './dimensions-e4fbc23d.js';
import './UNSAFE_BaseButton/themes/redwood/BaseButtonTheme.js';
import './UNSAFE_BaseButton/themes/BaseButtonStyles.css.js';
import './BaseButtonStyles.styles.css';
import './UNSAFE_BaseButton/themes/redwood/BaseButtonVariants.css.js';
import './UNSAFE_BaseButton/themes/redwood/BaseButtonBaseTheme.styles.css';
import './BareButton-1e3df7cb.js';
import './useBareButton-ff4bd21e.js';
import './usePress-051f5adb.js';
import './usePressClick-945cc43b.js';
import './TabbableModeContext-7d8ad946.js';
import './useTabbableMode-090ed4b5.js';
import './buttonUtils-55fb1df7.js';
import './id-83adac50.js';
import './useTestId-f24ac480.js';
import './Text-834eb35e.js';
import './UNSAFE_Text/themes/TextStyles.css.js';
import './TextStyles.styles.css';
import './useTranslationBundle-4822502f.js';
import './hooks/PRIVATE_useVisSelection/themes/ClearSelection.css.js';
import './ClearSelection.styles.css';
import './cssUtils-9e0e0351.js';
import './useChartContextMenu-5de82cd7.js';
import './useContextMenu-730d6c12.js';
import './SelectMenuGroupContext-aa1fe822.js';
import './Sheet-f9f8a4a4.js';
import './Modal-c0f730b8.js';
import './UNSAFE_Modal/themes/ModalStyles.css.js';
import './ModalStyles.styles.css';
import './tabbableUtils-c8311ec6.js';
import './head-8f89fe66.js';
import './_arity-be492b9e.js';
import './_isArray-694cc52d.js';
import './_isString-675f1de9.js';
import './popupUtils-51366a29.js';
import './WindowOverlay-7264c44a.js';
import './UNSAFE_WindowOverlay/themes/WindowOverlayStyles.css.js';
import './WindowOverlayStyles.styles.css';
import './UNSAFE_WindowOverlay/themes/WindowOverlayContract.css.js';
import './UNSAFE_WindowOverlay/themes/redwood/WindowOverlayTheme.js';
import './UNSAFE_WindowOverlay/themes/redwood/WindowOverlayBaseTheme.css.js';
import './UNSAFE_WindowOverlay/themes/redwood/WindowOverlayBaseTheme.styles.css';
import './UNSAFE_WindowOverlay/themes/redwood/WindowOverlayVariants.css.js';
import './UNSAFE_Sheet/themes/SheetStyles.css.js';
import './SheetStyles.styles.css';
import './useAnimationStatus-b881f39a.js';
import './useAnimation-fe39685e.js';
import './animationUtils-5f409a6c.js';
import './Dropdown-019aba37.js';
import './keyboardUtils-986fe923.js';
import './usePopupAnimation-96d2bc83.js';
import './popupAnimationUtils-175151d9.js';
import './CollectionInteractionContext-7cf19abc.js';
import './UNSAFE_Dropdown/themes/dropdownStyles.css.js';
import './dropdownStyles.styles.css';
import './useOutsideMousedown-c45c22c0.js';
import './useEffectEvent-1bb008cb.js';
import './UNSAFE_Menu/themes/MenuStyles.css.js';
import './MenuStyles.styles.css';
import './UNSAFE_Menu/themes/DropdownMenuStyles.css.js';
import './DropdownMenuStyles.styles.css';
import './Flex-03129963.js';
import './boxalignment-8980856d.js';
import './boxalignment.styles.css';
import './vanilla-extract-sprinkles-createRuntimeSprinkles.esm-2d655d37.js';
import './flexbox-529f25da.js';
import './flexbox.styles.css';
import './flexitem-7b7f7920.js';
import './flexitem.styles.css';
import './FlexStyles.styles.css';
import './Skeleton-d6f0969e.js';
import './borders-98a63040.js';
import './UNSAFE_Skeleton/themes/redwood/SkeletonTheme.js';
import './UNSAFE_Skeleton/themes/SkeletonStyles.css.js';
import './SkeletonStyles.styles.css';
import './UNSAFE_Skeleton/themes/redwood/SkeletonBaseTheme.css.js';
import './UNSAFE_Skeleton/themes/redwood/SkeletonBaseTheme.styles.css';
import './UNSAFE_Skeleton/themes/redwood/SkeletonVariants.css.js';
import './UNSAFE_Menu/themes/MenuSkeletonStyles.css.js';
import './MenuSkeletonStyles.styles.css';
import './LiveRegion-cebac18d.js';
import './LiveRegionStyles.styles.css';
import './UNSAFE_Menu/themes/redwood/MenuItemTheme.js';
import './UNSAFE_Menu/themes/MenuItemStyles.css.js';
import './MenuItemStyles.styles.css';
import './UNSAFE_Menu/themes/redwood/MenuItemBaseTheme.css.js';
import './UNSAFE_Menu/themes/redwood/MenuItemBaseTheme.styles.css';
import './UNSAFE_Menu/themes/redwood/MenuItemVariants.css.js';
import './MenuItemVariants.styles.css';
import './useInteractionStyle-99e32c23.js';
import './TooltipContentStyles.styles.css';
import './hooks/UNSAFE_useTooltip/themes/redwood/TooltipContentBaseTheme.styles.css';
import './hooks/UNSAFE_useTooltip/themes/redwood/TooltipContentVariants.css.js';
import './TooltipContentVariants.styles.css';
import './tooltipUtils-af0abd38.js';
import './EnvironmentProvider-6a0a8212.js';
import './LayerManager-52a26c55.js';
import './IconStyle.styles.css';
import './UNSAFE_Separator/themes/SeparatorStyles.css.js';
import './SeparatorStyles.styles.css';
import './MenuSeparatorStyles.styles.css';
import './UNSAFE_Menu/themes/redwood/MenuSeparatorBaseTheme.styles.css';
import './UNSAFE_Menu/themes/redwood/MenuSeparatorVariants.css.js';
import './useContextMenuGesture-e09f4c69.js';
import './textSelectionUtils-e87a47ff.js';
import './useChartDnd-aa8bc33b.js';
import './utils-8e622bdf.js';
import './useDnd-c5ae190c.js';
import './useTooltip-94af94d4.js';
import './useTooltipControlled-f2cfa454.js';
import './useFocus-38c95977.js';
import './useTouch-4828df25.js';
import './hooks/UNSAFE_useTooltip/themes/redwood/TooltipContentTheme.js';
import './hooks/UNSAFE_useTooltip/themes/TooltipContentStyles.css.js';
import './hooks/UNSAFE_useTooltip/themes/redwood/TooltipContentBaseTheme.css.js';
import './useChartMarquee-761eb7db.js';
import './useVisDragModeControls-af64848c.js';
import './Button-71c397c6.js';
import './Icon-4983d06e.js';
import './UNSAFE_Icon/themes/IconStyle.css.js';
import './Move-94f6dc8c.js';
import './hooks/PRIVATE_useVisDragModeControls/themes/useVisDragModeControls.css.js';
import './useVisDragModeControls.styles.css';
import './ZoomAlt-6a880eb4.js';
import './ButtonSetSingle-5af3a67b.js';
import './useButtonSetContext-6a483d7f.js';
import './ButtonSet-b7464e9a.js';
import './UNSAFE_ButtonSet/themes/ButtonSetStyles.css.js';
import './ButtonSetStyles.styles.css';
import './ButtonSetPositionContext-5730d367.js';
import './toggleButtonUtils-75e3d781.js';
import './useRovingTabIndexContainer-5992e107.js';
import './ButtonSetItem-280755f3.js';
import './ButtonSetButton-8685c752.js';
import './ToggleButtonLabel-7f53fbee.js';
import './ButtonLabelLayout-1631c997.js';
import './useButtonLabelLayoutTheme-448e671d.js';
import './UNSAFE_ButtonLabelLayout/themes/redwood/ButtonLabelLayoutTheme.js';
import './UNSAFE_ButtonLabelLayout/themes/ButtonLabelLayoutStyles.css.js';
import './ButtonLabelLayoutStyles.styles.css';
import './UNSAFE_ButtonLabelLayout/themes/redwood/ButtonLabelLayoutBaseTheme.css.js';
import './UNSAFE_ButtonLabelLayout/themes/redwood/ButtonLabelLayoutBaseTheme.styles.css';
import './UNSAFE_ButtonLabelLayout/themes/redwood/ButtonLabelLayoutVariants.css.js';
import './ButtonLabelLayoutVariants.styles.css';
import './HiddenAccessible-61197e7c.js';
import './HiddenAccessibleStyles.styles.css';
import './ButtonSetIconButton-c8ed85f9.js';
import './useButtonSetPositionContext-1dc5156a.js';
import './IconToggleButton-808818f5.js';
import './useToggleAction-fc0f5399.js';
import './hooks/PRIVATE_useChartMarquee/themes/useChartMarquee.css.js';
import './useChartMarquee.styles.css';
import './useVisTouchResponse-a59ab166.js';
import './useOverviewContext-79377674.js';
import './OverviewSlidingWindow-a8a4c9ef.js';
import './PRIVATE_VisOverview/themes/VisOverview.css.js';
import './VisOverview.styles.css';
import './DragH-3ab8136b.js';

const LINE_WITH_AREA_OPACITY = 0.2;
/**
 * The LineAreaChart displays information graphically using lines and filled areas, making relationships among the data easier to understand.
 */
const LineAreaChart = forwardRef(({ width, height, selectedIds = [], hiddenIds = [], highlightedIds, hideAndShowBehavior = 'none', orientation = 'vertical', yAxis, y2Axis, series, groups, isStacked = false, getDataItem, selectionMode = 'none', drilling = 'off', type = 'line', overview = 'off', dataLabelEffect = 'outline', ...props }, ref) => {
    const { direction, forcedColors } = useUser();
    const isHighContrast = forcedColors === 'active';
    const isTestEnv = props.testId !== undefined;
    const isRtl = direction === 'rtl';
    const isLog = yAxis?.scale === 'log';
    const timeAxisType = props.xAxis?.timeAxisType;
    const hiddenSet = new Set(hiddenIds);
    const selectedSet = new Set(selectedIds);
    const highlightedSet = new Set(highlightedIds);
    const isHoriz = orientation === 'horizontal';
    const colors = getColorRamp();
    let renderedSeries = isStacked
        ? getCumulativeSeries(series.length, groups.length, getDataItem, hiddenSet, isLog)
        : getSeriesData(series?.length, groups?.length, getDataItem, hiddenSet, isLog);
    const renderedGetDataItem = (seriesIndex, groupIndex) => {
        if (!isStacked)
            return getDataItem(seriesIndex, groupIndex);
        return {
            ...getDataItem(seriesIndex, groupIndex),
            value: renderedSeries[seriesIndex][groupIndex]
        };
    };
    const getGapRatio = () => {
        return 1;
    };
    const getNextChartItemFunc = (startIndex, endIndex) => {
        // TODO: JET-71332
        //@ts-ignore
        return getLineAreaChartNavUtil(getDataItem, series.length, startIndex, endIndex, isStacked, isRtl, isHoriz);
    };
    const getDataItemPos = (xScale, yScale, y2Scale) => {
        return (seriesIndex, groupIndex) => {
            const isAssociatedToY2 = series[seriesIndex].associatedYAxis === 'y2';
            return getLineAreaChartItemPosition(seriesIndex, groupIndex, renderedSeries, getDataItem, groups, isHoriz, xScale, isAssociatedToY2 ? y2Scale : yScale, timeAxisType);
        };
    };
    const getMarkerColorAndType = (seriesIndex, groupIndex) => {
        return {
            color: getItemColor(seriesIndex, groupIndex, series, getDataItem),
            type: getMarkerType(seriesIndex, groupIndex, getDataItem)
        };
    };
    const findNearest = (xScale, yScale, y2Scale) => {
        const getSeriesDataInfo = () => {
            return {
                offset: 0,
                dataWidth: 0
            };
        };
        const getYCoord = (value, yScale) => {
            return yScale.transform(value);
        };
        return findNearestDataPoint(series, groups, xScale, yScale, renderedGetDataItem, isStacked, getSeriesDataInfo, getYCoord, isLog, 0, hiddenSet, timeAxisType, y2Scale);
    };
    const { hasCenteredSeries, hasUncenteredSeries } = series.reduce((acc, s) => {
        return {
            hasCenteredSeries: acc.hasCenteredSeries ||
                s.lineType === 'centeredSegmented' ||
                s.lineType === 'centeredStepped',
            hasUncenteredSeries: acc.hasUncenteredSeries || s.lineType === 'segmented' || s.lineType === 'stepped'
        };
    }, { hasCenteredSeries: false, hasUncenteredSeries: false });
    const getOffset = (groupCount) => {
        return getStartAndEndAxesOffset(hasCenteredSeries, hasUncenteredSeries, isHoriz, groupCount);
    };
    const markers = getMarkers();
    const areaOpacity = type === 'lineWithArea' ? LINE_WITH_AREA_OPACITY : 1;
    const isAreaRendered = type === 'area' || type === 'lineWithArea';
    const isContrastLineNeeded = type === 'area';
    const allLineSegmentCoords = [];
    return (jsx(Chart, { ref: ref, width: width, height: height, selectedIds: selectedSet, hiddenIds: hiddenIds, hideAndShowBehavior: hideAndShowBehavior, orientation: orientation, yAxis: yAxis, y2Axis: y2Axis, series: series, groups: groups, selectionMode: selectionMode, drilling: drilling, isStacked: isStacked, getDataItem: getDataItem, findNearest: findNearest, getDataItemPos: getDataItemPos, getMarkerInfo: getMarkerColorAndType, renderGridLinesInFront: isAreaRendered, getNavUtil: getNextChartItemFunc, getGapRatio: getGapRatio, getStartAndEndAxesOffset: getOffset, isRtl: isRtl, overview: overview, defaultOverviewContentRenderer: () => {
            return (jsx(OverviewLineAreaChart, { series: series, groups: groups, getDataItem: getDataItem, type: type }));
        }, ...props, children: ({ getItemAriaLabel, groupsInfo, xStartIndex, xEndIndex, xScale, yScale, y2Scale, activeId, focusedItemInfo, hoveredItemInfo, isPointInsideMarquee, defaultFontSize, getTextDimensions, plotAreaClipPathId, axisStepWidth }) => {
            const leafGroups = groupsInfo.map(({ item }) => item);
            renderedSeries = isStacked
                ? getCumulativeSeries(series.length, leafGroups.length, getDataItem, hiddenSet, isLog)
                : getSeriesData(series?.length, leafGroups?.length, getDataItem, hiddenSet, isLog);
            return (jsxs(Fragment, { children: [renderedSeries.map((lineAreaSeries, index) => {
                        if (lineAreaSeries.length === 0) {
                            /* TODO: need a better way to handle when a series is hidden. */
                            return;
                        }
                        const seriesItem = series[index];
                        const isAssociatedToY2 = seriesItem.associatedYAxis === 'y2';
                        const lineSegmentCoords = getLineAreaSegments(isAssociatedToY2 ? y2Scale : yScale, xScale, lineAreaSeries, xStartIndex, xEndIndex, isLog, leafGroups, index, renderedGetDataItem, timeAxisType);
                        allLineSegmentCoords[index] = lineSegmentCoords[0];
                        const isBottomSegmentCurved = seriesItem.lineType === 'curved' &&
                            isStacked &&
                            renderedSeries.length > 1 &&
                            index > 0;
                        const isHighlighted = highlightedIds === undefined ||
                            highlightedIds.length === 0 ||
                            highlightedSet.has(seriesItem.id);
                        const prevCoords = isStacked && index != 0
                            ? allLineSegmentCoords.reduce((prevValue, newValue, j) => {
                                // find the index i such that i < index, and series i  has at least
                                // one or more data item unhidden. Only such series will can be
                                // used as bottomCoord for current series. Otherwise we have to use
                                // baseline coord
                                if (j >= index) {
                                    return prevValue;
                                }
                                if (newValue.length > 0) {
                                    return j;
                                }
                                return prevValue;
                            }, 0)
                            : undefined;
                        return (jsxs(Fragment, { children: [isAreaRendered && (jsx(AreaSeries, { yScale: isAssociatedToY2 ? y2Scale : yScale, lineType: seriesItem.lineType, color: seriesItem.areaColor || colors[index % colors.length], isHorizontal: isHoriz, areaColorOpacity: areaOpacity, isBottomSegmentCurved: isBottomSegmentCurved, bottomCoords: prevCoords !== undefined &&
                                        allLineSegmentCoords[prevCoords].some((value) => value != null)
                                        ? allLineSegmentCoords[prevCoords]
                                        : undefined, lineSegments: lineSegmentCoords, isLog: isLog, isHighlighted: isHighlighted, seriesIndex: index, groupWidth: axisStepWidth, isRtl: isRtl, timeAxisType: timeAxisType, plotAreaClipPathId: plotAreaClipPathId })), jsx(LineSeries, { lineType: seriesItem.lineType, 
                                    /* TODO: confirm with UX if this is contrastLine (changes depending on dark/light mode) or always white.
                                      It's always white in legacy.*/
                                    lineColor: isContrastLineNeeded
                                        ? colorSchemeVars.dvt.contrastLine
                                        : seriesItem.lineColor, 
                                    /* The area generated in legacy are bit apart and not touching when stacked. Preact areas are a bit closer than legacy when curved.
                                    Increased the contrast linewidth (to 2.5 from legacy 1.25) to give legacy visual treatment.
                                    TODO: investivage why legacy areas are not touching. maybe we want to do the same in preact svg utils that
                                    generates this curve.
                                   */
                                    lineWidth: isContrastLineNeeded ? (isStacked ? 2.5 : 1.25) : seriesItem.lineWidth, lineStyle: seriesItem.lineStyle, color: seriesItem.lineColor || colors[index % colors.length], lineSegmentCoords: lineSegmentCoords, isHorizontal: isHoriz, isHighlighted: isHighlighted, seriesIndex: index, groupWidth: axisStepWidth, isRtl: isRtl, timeAxisType: timeAxisType, plotAreaClipPathId: plotAreaClipPathId }), 
                                /* For non stacked charts, markers should render in the order of series. Some markers might get hidden behind area but this preserves the legacy behavior.
                                JET-75357: Segmented and stepped lines may stack markers/lines incorrectly by series order, so excluded from non-stacked charts.
                               */
                                !isStacked &&
                                    seriesItem.lineType !== 'stepped' &&
                                    seriesItem.lineType !== 'segmented' && (jsx(MarkersWithLabel, { yScale: isAssociatedToY2 ? y2Scale : yScale, xScale: xScale, groups: leafGroups, series: seriesItem, timeAxisType: timeAxisType, color: seriesItem.lineColor ||
                                        seriesItem.areaColor ||
                                        colors[index % colors.length] /* TODO : make this use getItemColor function from dataStyleUtils. */, seriesIndex: index, startIndex: xStartIndex, endIndex: xEndIndex, markerType: markers[index % markers.length], orientation: orientation, isLog: isLog, activeId: activeId, getDataItem: getDataItem, isPointInsideMarquee: isPointInsideMarquee, selectedIds: selectedSet, highlightedIds: highlightedIds !== undefined ? highlightedSet : undefined, focusedItemIndex: focusedItemInfo.seriesIndex === index &&
                                        focusedItemInfo.isFocusVisible &&
                                        !(props.isDataCursorEnabled &&
                                            props.dataCursorStyle?.isMarkerDisplayed)
                                        ? focusedItemInfo.groupIndex
                                        : undefined, hoveredItemIndex: hoveredItemInfo?.isCurrent && hoveredItemInfo.seriesIndex === index
                                        ? hoveredItemInfo.groupIndex
                                        : undefined, isSelectionEnabled: selectionMode === 'single' || selectionMode === 'multiple', isDrillEnabled: drilling === 'on', defaultFontSize: defaultFontSize, dataLabelEffect: dataLabelEffect, isHighContrast: isHighContrast, isTestEnv: isTestEnv, getTextDimensions: getTextDimensions, getItemAriaLabel: getItemAriaLabel, isRtl: isRtl }))] }));
                    }), renderedSeries.map((lineAreaSeries, index) => {
                        if (lineAreaSeries.length === 0) {
                            /* TODO: need a better way to handle when a series is hidden.*/
                            return;
                        }
                        const seriesItem = series[index];
                        const isAssociatedToY2 = seriesItem.associatedYAxis === 'y2';
                        return isStacked ||
                            seriesItem.lineType === 'segmented' ||
                            seriesItem.lineType === 'stepped' ? (jsx(MarkersWithLabel, { yScale: isAssociatedToY2 ? y2Scale : yScale, series: series[index], xScale: xScale, groups: leafGroups, timeAxisType: timeAxisType, color: seriesItem.lineColor || seriesItem.areaColor || colors[index % colors.length], seriesIndex: index, isPointInsideMarquee: isPointInsideMarquee, startIndex: xStartIndex, endIndex: xEndIndex, markerType: markers[index % markers.length], orientation: orientation, isLog: isLog, activeId: activeId, getDataItem: renderedGetDataItem, selectedIds: selectedSet, focusedItemIndex: focusedItemInfo.seriesIndex === index && focusedItemInfo.isFocusVisible
                                ? focusedItemInfo.groupIndex
                                : undefined, hoveredItemIndex: hoveredItemInfo?.isCurrent && hoveredItemInfo.seriesIndex === index
                                ? hoveredItemInfo.groupIndex
                                : undefined, isSelectionEnabled: selectionMode === 'single' || selectionMode === 'multiple', isDrillEnabled: drilling === 'on', defaultFontSize: defaultFontSize, dataLabelEffect: dataLabelEffect, isHighContrast: isHighContrast, isTestEnv: isTestEnv, getTextDimensions: getTextDimensions, getItemAriaLabel: getItemAriaLabel, isRtl: isRtl })) : undefined;
                    })] }));
        } }));
});
function OverviewLineAreaChart(props) {
    return (jsx(LineAreaChart, { datatip: () => ({ content: '' }), zoomAndScroll: "off", overview: "off", plotArea: {
            yMajorTick: {
                isRendered: false
            }
        }, xAxis: {
            tickLabel: {
                autoRotate: false,
                // @ts-ignore
                isRendered: props.xAxis?.timeAxisType ? true : false
            }
        }, series: props.series, groups: props.groups, getDataItem: props.getDataItem, yAxis: {
            tickLabel: {
                isRendered: false
            }
        }, type: props.type }));
}

export { LineAreaChart };
//# sourceMappingURL=UNSAFE_LineAreaChart.js.map
