import { CubeIcon, ExclamationTriangleIcon } from '@heroicons/react/24/outline'; import { ReactElement } from 'react'; import { useDispatch, useSelector } from 'react-redux'; import { RootState } from '../../../app/store'; import { useGetProductsCountQuery } from '../../../features/products/productsApi'; import { changeQueryParams } from '../../../features/products/productsSlice'; import cn from '../../../utils/cn'; import { __ } from '@wordpress/i18n'; type StatusCardPropsType = { title: string; count: number | string | undefined; className?: string; icon: ReactElement; active?: boolean; onClick: () => void; isLoading: boolean; }; const StatusCard = ( { title, count, className, icon, active, onClick, isLoading, }: StatusCardPropsType ) => { return ( ); }; const StockStatus = () => { const { data, isLoading } = useGetProductsCountQuery(); const dispatch = useDispatch(); const { query } = useSelector( ( state: RootState ) => state.products ); const handleCountFilterType = ( status: string ) => { dispatch( changeQueryParams( { ...query, status } ) ); }; return (