import { PHXText } from '../Text/Text';
import React from 'react';
import { classNames } from '../types';
export const PHXHelpText = ({ helpText, isHelpTextArray }) => {
    if (!helpText)
        return React.createElement(React.Fragment, null);
    const HelpTextComp = ({ title, description }) => (React.createElement(React.Fragment, null,
        React.createElement(PHXText, { as: 'div', tone: 'subdued' }, `${title}:`),
        React.createElement(PHXText, { as: 'div' }, description)));
    return (React.createElement(PHXText, { as: 'div', tone: 'subdued' }, isHelpTextArray && (helpText === null || helpText === void 0 ? void 0 : helpText.length) > 0 ? (React.createElement(React.Fragment, null, helpText.map((item, index) => (React.createElement("div", { key: index, className: classNames('flex gap-1', index !== 0 && 'mt-1') },
        React.createElement(HelpTextComp, { title: item.title, description: item.description })))))) : (React.createElement(React.Fragment, null, typeof helpText === 'string' ? (helpText) : (React.createElement("div", { className: 'flex gap-1' },
        React.createElement(HelpTextComp, { title: helpText.title, description: helpText.description })))))));
};
//# sourceMappingURL=HelpText.js.map