import { __rest } from '../../../../_virtual/_tslib.js';
import React__default from 'react';
import { getId } from '../../../../utils/index.js';
import Close from '../../../../icons/Close.js';
import { ButtonSheetImageWrapper, ImageStyled } from './styles.js';
import { IconButton } from '../../../IconButton/index.js';

const ButtonSheetImage = (_a) => {
    var { imgValues = {
        imgAlt: '',
        objectFit: 'cover',
        objectPosition: 'center',
        asHeader: false,
        imgSrc: '',
        imgHeight: '',
    }, headerControlsModifiers, onClose } = _a, props = __rest(_a, ["imgValues", "headerControlsModifiers", "onClose"]);
    const appendTestId = getId(`${props['data-testid']}-bottom-sheet-image`);
    const appendTrackId = getId(`${props['data-trackid']}-bottom-sheet-image`);
    return imgValues ? (React__default.createElement(ButtonSheetImageWrapper, { imgHeight: imgValues.imgHeight },
        React__default.createElement(ImageStyled, { src: imgValues.imgSrc, alt: imgValues.imgAlt, objectFit: imgValues.objectFit, objectPosition: imgValues.objectPosition, asHeader: imgValues.asHeader, loading: "lazy" }),
        headerControlsModifiers === 'close' && imgValues.asHeader && (React__default.createElement(IconButton, { size: "x-small", variant: "secondary", icon: React__default.createElement(Close, null), onClick: onClose, "data-testid": appendTestId('close-button'), "data-trackid": appendTrackId('close-button') })))) : null;
};

export { ButtonSheetImage as default };
