'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

var React = require('react');
var styles = require('./styles.js');

function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }

var React__default = /*#__PURE__*/_interopDefaultLegacy(React);

const ListItemContent = ({ primaryText, secondaryText, variant, prefix, suffix, }) => {
    let primaryTextAttributes = {};
    if ((prefix === null || prefix === void 0 ? void 0 : prefix.type) === 'action' || (suffix === null || suffix === void 0 ? void 0 : suffix.type) === 'action') {
        primaryTextAttributes = {
            as: 'label',
            htmlFor: ((prefix === null || prefix === void 0 ? void 0 : prefix.type) === 'action' && (prefix === null || prefix === void 0 ? void 0 : prefix.htmlFor)) ||
                ((suffix === null || suffix === void 0 ? void 0 : suffix.type) === 'action' && (suffix === null || suffix === void 0 ? void 0 : suffix.htmlFor)) ||
                '',
        };
    }
    return (React__default['default'].createElement(styles.ListItemContentWrapper, null,
        React__default['default'].createElement(styles.ListItemPrimaryText, Object.assign({}, primaryTextAttributes), primaryText),
        variant === 'multi-line' && typeof secondaryText === 'string' ? (React__default['default'].createElement(styles.ListItemSecondaryText, null, secondaryText)) : (secondaryText)));
};

exports.ListItemContent = ListItemContent;
