import React from 'react';
import {
Box,
Typography,
Card,
CardContent,
Divider,
Chip,
useTheme,
IconButton,
useMediaQuery
} from '@mui/material';
import {
TrendingUp as TrendingUpIcon,
TrendingDown as TrendingDownIcon,
CheckCircle as CheckCircleIcon,
Cancel as CancelIcon,
Pending as PendingIcon
} from '@mui/icons-material';
import MoreVertIcon from '@mui/icons-material/MoreVert';
import {
CircularProgressbar,
buildStyles
} from 'react-circular-progressbar';
import 'react-circular-progressbar/dist/styles.css';
import ArrowDownwardIcon from '@mui/icons-material/ArrowDownward';
import ArrowUpwardIcon from '@mui/icons-material/ArrowUpward';
// import { Box, IconButton, Paper, Typography, useTheme, useMediaQuery } from '@mui/material';
import {
ResponsiveContainer,
} from 'recharts';
const OrderStatusCard = ({
title = 'Order Status',
period = 'This Quarter',
progress = 70.5,
progressChange = '+10%',
progressDirection = 'up', // or 'down'
description = 'You succeeded in earning $240 today, it’s higher than yesterday',
completed = '$20k',
canceled = '$16k',
pending = '$1.5k'
}) => {
const theme = useTheme();
const progressColor = progressDirection === 'up' ? theme.palette.success.main : theme.palette.error.main;
const progressIcon = progressDirection === 'up' ? : ;
const highlightedDescription = description.replace(
/(\$\d+(?:\.\d+)?[kKmM]?)/g,
'$1'
);
const isMobile = useMediaQuery(theme.breakpoints.down('sm'));
const isTablet = useMediaQuery(theme.breakpoints.between('sm', 'md'));
return (
{/* زر الإجراءات في الزاوية العلوية اليمنى */}
{/* Header */}
{title}
{period}
{/* Progress Circle */}
{/* تغيير النسبة تحت الدائرة */}
{/* دائرة التقدم */}
{/* النص داخل الدائرة */}
{`${progress}%`}
{/* الوصف */}
{/* الحقول الثلاثة (Completed / Canceled / Pending) */}
{/* لكل قسم: */}
{[{
label: 'Completed',
icon: ,
value: completed
}, {
label: 'Canceled',
icon: ,
value: canceled
}, {
label: 'Pending',
icon: ,
value: pending
}].map(({ label, icon, value }, i) => (
{label}
{icon}
{value}
))}
);
};
export default OrderStatusCard;