import { jsx, jsxs } from "react/jsx-runtime";
import { styled } from "@mui/material";
import apollo_core from "@uipath/apollo-core";
import react from "react";
import { ApTypography } from "../../../../ap-typography/index.js";
import { useChatState } from "../../../providers/chat-state-provider.js";
import { AutopilotChatSuggestions } from "../suggestions/chat-suggestions.js";
const FREContainer = styled('div')(()=>({
        display: 'flex',
        flexDirection: 'column',
        borderRadius: apollo_core.Border.BorderRadiusL,
        position: 'absolute',
        bottom: 0,
        marginBottom: apollo_core.Spacing.SpacingL,
        maxHeight: `calc(100% - ${apollo_core.Spacing.SpacingL})`,
        width: `calc(100% - (2 * ${apollo_core.Spacing.SpacingL}))`,
        overflow: 'auto'
    }));
const FREHeader = styled('div')(()=>({
        display: 'flex',
        flexDirection: 'column',
        gap: apollo_core.Spacing.SpacingXs,
        marginBottom: apollo_core.Spacing.SpacingL
    }));
function AutopilotChatFREComponent() {
    const { firstRunExperience, spacing } = useChatState();
    if (!firstRunExperience) return null;
    return /*#__PURE__*/ jsxs(FREContainer, {
        children: [
            /*#__PURE__*/ jsxs(FREHeader, {
                children: [
                    /*#__PURE__*/ jsx(ApTypography, {
                        variant: spacing.titleFontToken,
                        color: 'var(--color-foreground)',
                        children: firstRunExperience.title
                    }),
                    /*#__PURE__*/ jsx(ApTypography, {
                        variant: spacing.primaryFontToken,
                        color: 'var(--color-foreground-de-emp)',
                        children: firstRunExperience.description
                    })
                ]
            }),
            firstRunExperience.suggestions && firstRunExperience.suggestions.length > 0 && /*#__PURE__*/ jsx(AutopilotChatSuggestions, {
                disableAnimation: true,
                suggestions: firstRunExperience.suggestions,
                sendOnClick: firstRunExperience.sendOnClick
            })
        ]
    });
}
const AutopilotChatFRE = /*#__PURE__*/ react.memo(AutopilotChatFREComponent);
export { AutopilotChatFRE };
