import * as __WEBPACK_EXTERNAL_MODULE__chakra_ui_react__ from "@chakra-ui/react";
import * as __WEBPACK_EXTERNAL_MODULE_chakra_react_select__ from "chakra-react-select";
const SingleValue = ({ children, headerColumns, singleValueText = {}, firstTextPosition = 'left', ...props })=>{
    const [value] = props?.getValue();
    const textColor = (0, __WEBPACK_EXTERNAL_MODULE__chakra_ui_react__.useColorModeValue)('gray.600', 'whiteAlpha.900');
    const displayStyle = {
        base: 'none',
        sm: 'inherit',
        md: 'inherit',
        lg: 'inherit',
        xl: 'inherit'
    };
    const { label, value: _singleValue, ...otherValueText } = value;
    return /*#__PURE__*/ React.createElement(__WEBPACK_EXTERNAL_MODULE__chakra_ui_react__.Box, {
        sx: {
            gridArea: '1 / 1 / 2 / 3',
            mx: '0.125rem',
            maxWidth: '100%',
            overflow: 'hidden',
            textOverflow: 'ellipsis',
            whiteSpace: 'nowrap',
            color: 'whiteAlpha.900'
        }
    }, /*#__PURE__*/ React.createElement(__WEBPACK_EXTERNAL_MODULE_chakra_react_select__.components.SingleValue, props, /*#__PURE__*/ React.createElement(__WEBPACK_EXTERNAL_MODULE__chakra_ui_react__.Grid, {
        templateColumns: headerColumns?.map(()=>'minmax(0, 1fr)').join(' ')
    }, Object.entries(otherValueText).map(([key, keyValue], id)=>{
        if ('label' === key || 'value' === key) return;
        return /*#__PURE__*/ React.createElement(__WEBPACK_EXTERNAL_MODULE__chakra_ui_react__.GridItem, {
            key: id
        }, /*#__PURE__*/ React.createElement(__WEBPACK_EXTERNAL_MODULE__chakra_ui_react__.HStack, {
            spacing: 2
        }, 0 === id && 'left' === firstTextPosition && singleValueText[key] && /*#__PURE__*/ React.createElement(__WEBPACK_EXTERNAL_MODULE__chakra_ui_react__.Text, {
            color: textColor,
            display: displayStyle
        }, singleValueText[key]), /*#__PURE__*/ React.createElement(__WEBPACK_EXTERNAL_MODULE__chakra_ui_react__.Text, {
            color: textColor
        }, keyValue), 0 === id && 'right' === firstTextPosition && singleValueText[key] && /*#__PURE__*/ React.createElement(__WEBPACK_EXTERNAL_MODULE__chakra_ui_react__.Text, {
            color: textColor,
            display: displayStyle
        }, singleValueText[key]), 0 !== id && singleValueText[key] && /*#__PURE__*/ React.createElement(__WEBPACK_EXTERNAL_MODULE__chakra_ui_react__.Text, {
            color: textColor,
            pt: "2px",
            fontSize: "0.75rem",
            display: displayStyle
        }, singleValueText[key])));
    }))));
};
/* ESM default export */ const SingleValue_rslib_entry_ = SingleValue;
export { SingleValue_rslib_entry_ as default };
