import { ConditionallyRender } from '../../../../common/ConditionallyRender/ConditionallyRender'; import { Box, IconButton, Popover, styled, useTheme } from '@mui/material'; import { flexRow } from '../../../../../themes/themeStyles'; import { PlaygroundResultChip } from '../../PlaygroundResultsTable/PlaygroundResultChip/PlaygroundResultChip'; import { InfoOutlined } from '@mui/icons-material'; import React, { useState } from 'react'; import { AdvancedPlaygroundEnvironmentFeatureSchema } from 'openapi'; import { PlaygroundEnvironmentTable } from '../../PlaygroundEnvironmentTable/PlaygroundEnvironmentTable'; const StyledContainer = styled( 'div', {} )(({ theme }) => ({ flexGrow: 0, ...flexRow, justifyContent: 'flex-start', margin: theme.spacing(0, 1.5), })); const StyledPlaygroundChipContainer = styled(Box)(({ theme }) => ({ display: 'flex', flexDirection: 'row', gap: theme.spacing(1), })); export interface IAdvancedPlaygroundEnvironmentCellProps { value: AdvancedPlaygroundEnvironmentFeatureSchema[]; } export const AdvancedPlaygroundEnvironmentCell = ({ value, }: IAdvancedPlaygroundEnvironmentCellProps) => { const theme = useTheme(); const [anchor, setAnchorEl] = useState(null); const onOpen = (event: React.FormEvent) => setAnchorEl(event.currentTarget); const onClose = () => setAnchorEl(null); const open = Boolean(anchor); const enabled = (value || []).filter(evaluation => evaluation.isEnabled); const disabled = (value || []).filter(evaluation => !evaluation.isEnabled); return ( 0} show={ } /> 0} show={ } /> <> ); };