import { useWidgetStore } from "../../../store/useWidgetStore"; import PieGraphComponent from "../charts/PieGraphComponent"; import BarGraphComponent from "../charts/BarGraphComponent"; import LineGraphComponent from "../charts/LineGraphComponent"; export const DraggableWidget = ({ widget }: { widget: any }) => { const { selectedChartId, setSelectedChartId } = useWidgetStore(); const handlePointerDown = () => { if (selectedChartId?.id !== widget.id) { setSelectedChartId(widget); } }; return ( <>
{widget.type === "progress" ? ( // <> ) : ( <> {widget.type === "line" && ( )} {widget.type === "bar" && ( )} {widget.type === "pie" && ( )} )}
); };