import { type SxProps, type Theme } from '@mui/material';

/** Normalises an `sx` prop into an array so it can be spread when composing styles. */
export const toSxArray = (sx: SxProps<Theme> | undefined) => {
  if (!sx) return [];
  return Array.isArray(sx) ? sx : [sx];
};

export {
  type HandleImageDropOptions,
  type HandleVideoDropOptions,
  handleImageDrop,
  handleVideoDrop,
} from './handleDrop';
export { insertImageWithLoader } from './imageLoader';
export { isActiveLoader } from './loaderRegistry';
export { getMediaAttributes } from './mediaAttributes';
export { wrapResizableMedia } from './resizableMedia';
