import { Card } from '@/components/ui'
import Chart from '../chart/Chart'

const WidgetBarChart = ({
  chartKey,
  startDateFormat,
  endDateFormat,
}: {
  chartKey: string
  startDateFormat: string
  endDateFormat: string
}) => {
  return (
    <Card className={'col-span-2'}>
      <div className="flex items-center justify-between">
        <h4>Top Selling</h4>
      </div>

      <Chart
        key={`Chart-${chartKey}`}
        listFormCode="Chart-0001"
        filter={`{"startDate":"${startDateFormat}", "endDate":"${endDateFormat}"}`}
      />
    </Card>
  )
}

export default WidgetBarChart
