import React from 'react';
import { ItemDescription } from './ItemDescription';
import { StatusChip } from '../UI/dataDisplay/status/StatusChip';
import { makeStyles } from '@material-ui/core';
const useStyles = makeStyles((theme) => ({
    headerRoot: {
        display: 'flex',
        flexDirection: 'row',
        justifyContent: 'space-between',
        alignItems: 'center',
        boxSizing: 'border-box',
        height: theme.spacing(5),
        borderBottom: '1px solid rgba(0, 0, 0, 0.12)',
        flexGrow: '0',
        paddingRight: theme.spacing(2),
        gap: theme.spacing(1.5),
        background: (props) => {
            var _a, _b, _c;
            return ((_a = props === null || props === void 0 ? void 0 : props.Alert) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === 'true'
                ? ((_b = props === null || props === void 0 ? void 0 : props.style) === null || _b === void 0 ? void 0 : _b.background)
                    ? (_c = props === null || props === void 0 ? void 0 : props.style) === null || _c === void 0 ? void 0 : _c.background
                    : '#FDF7F6'
                : theme.palette.background.paper;
        }
    },
    labelText: {
        fontWeight: 'inherit',
        flexGrow: 1,
        lineHeight: '1.25rem'
    },
    labelOverflow: {
        whiteSpace: 'nowrap',
        overflow: 'hidden',
        textOverflow: 'ellipsis'
    }
}));
/**
 * `AmbientListItem` component
 */
export const AmbientListItem = (props) => {
    const { dataList = [], paid, paidLabel = 'none', handleClick, style = {} } = props;
    const classes = useStyles(props);
    return (React.createElement("div", { className: classes.headerRoot, style: style }, dataList === null || dataList === void 0 ? void 0 : dataList.map((data, index) => (React.createElement(ItemDescription, { key: `${data.id}${index}`, iconName: data === null || data === void 0 ? void 0 : data.icon, label: data === null || data === void 0 ? void 0 : data.label, style: data === null || data === void 0 ? void 0 : data.style }))), (paid === null || paid === void 0 ? void 0 : paid.toLowerCase()) === 'true' && (React.createElement(StatusChip, { status: "success", label: paidLabel, onClick: handleClick }))));
};
//# sourceMappingURL=AmbientListItem.js.map