import React, { Component, useState } from 'react';
import Button from '@mui/material/Button';
import { styled } from '@mui/material/styles';
import { Container, Typography, Grid, CardActionArea, Card, CardContent, CardMedia, AvatarGroup, CardActions, Collapse, IconButton, Paper } from '@mui/material';
//CssBaseline, TextField, FormControlLabel, Checkbox, Link, Divider
import { getFullImageUrl } from "./../utills";
import ExpandMoreIcon from '@mui/icons-material/ExpandMore';
import { Box } from '@mui/system';
import { AvatarAnimated } from './AvatarAnimated';
const GoodExample = () => {
return
}
const ExpandMore = styled(props => {
const { expand, ...other } = props;
return ;
})(({ theme, expand }) => ({
transform: !expand ? 'rotate(0deg)' : 'rotate(180deg)',
marginLeft: 'auto',
transition: theme.transitions.create('transform', { duration: theme.transitions.duration.shortest })
}))
const AvatarGroupOriented = styled((props) => {
const { vertical, ...other } = props;
return ;
})(({ theme, vertical }) => (vertical && {
display: 'flex',
flexDirection: 'column',
marginLeft: 10,
'& >:first-child': {
marginTop: 10,
},
'& >*': {
marginLeft: 1,
marginTop: theme.spacing(1),
},
".MuiAvatar-root": { /*width: 20, height: 20,*/ marginLeft: 1 }
}));
const Good = ({ good, maxWidth, showAddToCard = true }) => {
let [currentImageIndex, setCurrentImageIndex] = useState(0);
let [expanded, setExpanded] = useState(false);
const handleExpandClick = () => setExpanded(!expanded);
maxWidth = maxWidth ?? 'md';
return (
{
good.images?.map((image, index) => (
{
setCurrentImageIndex(index)
}} />
))
}
0 ? getFullImageUrl(good.images[currentImageIndex]) : ''}
title={good.name}
/>
{good.name}
{`Price: $${good.price}`}
{
showAddToCard && (
)
}
Description:
{good.description}
)
}
export { Good, GoodExample };