import { useSetStatusInactivating } from './contexts/status';
import { useLoaderDataState } from './contexts/loader-data';
import type { MlModalProps } from './types';

export function PanelSlot({ panelSlot }: Pick<MlModalProps, 'panelSlot'>) {
  const loaderData = useLoaderDataState();
  const setStatusInactivating = useSetStatusInactivating();

  return <> {panelSlot({ loaderData, close: setStatusInactivating })}</>;
}
