2024-06-04 05:42:24 +00:00
|
|
|
import { observer } from "mobx-react";
|
|
|
|
// components
|
|
|
|
import { BulkOperationsUpgradeBanner } from "@/components/issues";
|
|
|
|
// hooks
|
|
|
|
import { useMultipleSelectStore } from "@/hooks/store";
|
2024-06-05 07:18:50 +00:00
|
|
|
import { TSelectionHelper } from "@/hooks/use-multiple-select";
|
2024-06-04 05:42:24 +00:00
|
|
|
|
|
|
|
type Props = {
|
|
|
|
className?: string;
|
2024-06-05 07:18:50 +00:00
|
|
|
selectionHelpers: TSelectionHelper;
|
2024-06-04 05:42:24 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
export const IssueBulkOperationsRoot: React.FC<Props> = observer((props) => {
|
2024-06-07 08:29:57 +00:00
|
|
|
const { className, selectionHelpers } = props;
|
2024-06-04 05:42:24 +00:00
|
|
|
// store hooks
|
|
|
|
const { isSelectionActive } = useMultipleSelectStore();
|
|
|
|
|
2024-06-07 08:29:57 +00:00
|
|
|
if (!isSelectionActive || selectionHelpers.isSelectionDisabled) return null;
|
2024-06-04 05:42:24 +00:00
|
|
|
|
|
|
|
return <BulkOperationsUpgradeBanner className={className} />;
|
|
|
|
});
|