import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { CollapseIcon } from '../../components/CollapseIcon';
import { useXMLViewerContext } from '../../context/xml-viewer-context';
import { useCollapsible } from '../../hooks/useCollapsible';
export function CommentTag(props) {
    const { indentation, children, isInline, level } = props;
    const { theme } = useXMLViewerContext();
    const { collapsed, buttonProps } = useCollapsible(level);
    return (_jsxs("div", { style: { color: theme.commentColor }, children: [_jsxs("span", { ...buttonProps, children: [_jsx("span", { children: indentation }), _jsx(CollapseIcon, { collapsed: collapsed }), _jsx("span", { children: '<!-- ' })] }), !collapsed && children, collapsed && '...', _jsx("span", { children: `${isInline || collapsed ? ' ' : indentation}-->` })] }));
}
//# sourceMappingURL=index.js.map