import { jsx } from "react/jsx-runtime";
import { Box } from "@mui/material";
import apollo_core from "@uipath/apollo-core";
import react from "react";
import { useChatState } from "../../../providers/chat-state-provider.js";
import { Text } from "./text.js";
const Ul = /*#__PURE__*/ react.memo(({ children })=>/*#__PURE__*/ jsx(Box, {
        component: "ul",
        sx: {
            listStyleType: 'disc',
            marginBlock: 'unset',
            marginInline: 'unset',
            paddingInlineStart: apollo_core.Spacing.SpacingM,
            display: 'block',
            lineHeight: apollo_core.FontFamily.FontMicroLineHeight
        },
        children: children
    }));
const Ol = /*#__PURE__*/ react.memo(({ children, start })=>/*#__PURE__*/ jsx(Box, {
        component: "ol",
        start: start,
        sx: {
            marginBlock: 'unset',
            marginInline: 'unset',
            paddingInlineStart: apollo_core.Spacing.SpacingBase,
            lineHeight: apollo_core.FontFamily.FontMicroLineHeight
        },
        children: children
    }));
const Li = /*#__PURE__*/ react.memo(({ children })=>{
    const { spacing } = useChatState();
    return /*#__PURE__*/ jsx(Box, {
        component: "li",
        sx: {
            '&::marker': {
                color: 'var(--color-foreground)',
                fontSize: apollo_core.FontFamily.FontMSize
            }
        },
        children: react.Children.map(children, (child)=>{
            if ('string' == typeof child) {
                const hasVisibleContent = child.trim().length > 0;
                if (!hasVisibleContent) return null;
                return Text({
                    children: child,
                    customStyle: {
                        display: 'inline'
                    },
                    variant: spacing.markdownTokens.li
                });
            }
            return child;
        })
    });
});
export { Li, Ol, Ul };
