import { jsx as _jsx } from "react/jsx-runtime";
import { forwardRef } from 'react';
import { useTestIds, useUID } from '../../hooks';
import Text from '../Text';
import { withTestIds } from '../../utils';
import { getSelectionCardTestIds } from './SelectionCard.test-ids';
import SelectionCard from './SelectionCard';
const SelectionCardDisplay = forwardRef(function SelectionCardDisplay(props, ref) {
    const uid = useUID();
    const { testId, id = uid, 'aria-label': ariaLabel, label, headingTag = 'h4', ...restProps } = props;
    const labelId = `${id}-label`;
    const testIds = useTestIds(testId, getSelectionCardTestIds);
    return (_jsx(SelectionCard, { ...restProps, testId: testIds, "aria-label": ariaLabel, "aria-labelledby": ariaLabel ? undefined : labelId, heading: _jsx(Text, { variant: headingTag, as: 'span', id: labelId, "data-testid": testIds.label, children: label }), ref: ref }));
});
export default withTestIds(SelectionCardDisplay, getSelectionCardTestIds);
//# sourceMappingURL=SelectionCardDisplay.js.map