'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 ListItemPrefix = React.forwardRef(({ variant, prefix }, ref) => {
    switch (prefix.type) {
        case 'thumbnail':
        case 'avatar':
            return (React__default['default'].createElement(styles.ListItemPrefixWrapper, { variant: variant, type: prefix.type, ref: ref }, prefix.img ? (React__default['default'].createElement("img", { src: prefix.img })) : (React__default['default'].createElement(styles.ImagePlaceholder, { type: prefix.type }))));
        case 'action':
        case 'icon':
        default:
            return (React__default['default'].createElement(styles.ListItemPrefixWrapper, { variant: variant, type: prefix.type, ref: ref }, prefix.element));
    }
});

exports.ListItemPrefix = ListItemPrefix;
