import { RenderModalCtx } from 'datocms-plugin-sdk' import { Canvas } from 'datocms-react-ui' import clsx from 'clsx' import { RasterLibraries, RasterPreview, RasterImages, useSelectedImages, } from '@raster-app/raster-toolkit' type Props = { ctx: RenderModalCtx } const Selector = ({ ctx }: Props) => { const { count, images: selectedPhotos } = useSelectedImages() const orgId = ctx.plugin.attributes.parameters.orgId as string const apiKey = ctx.plugin.attributes.parameters.apiKey as string const { selectedPhotos: initialValue } = ctx.parameters ?? {} if (!orgId || !apiKey) { return <>Please configure the plugin first> } return (