import CropGeneral from "@ui_kit/Modal/CropModal/cropGeneral"; import DevaceDesktopIcon from "@ui_kit/Modal/CropModal/IconCropModal/DevaceDesktopIcon"; import DevaceTabletIcon from "@ui_kit/Modal/CropModal/IconCropModal/DevaceTabletIcon"; import DevaceMobileIcon from "@ui_kit/Modal/CropModal/IconCropModal/DevaceMobileIcon"; import DevaceSmallIcon from "@ui_kit/Modal/CropModal/IconCropModal/DevaceSmallIcon"; import {PercentCrop} from "react-image-crop"; import {MutableRefObject} from "react"; const modalProps = { "desktop": {name: "Десктоп", icon: }, "tablet": {name:"Планшет", icon: }, "mobile": {name:"Телефон", icon: }, "small": {name:"Самые узкие экраны", icon: } } interface Props{ imageUrl: null | string; handleSizeChange: (a: number)=> void; handleRotateClick: Promise; getInitialCrop: (imageWidth: number, imageHeight: number, aspectRatio: number)=> PercentCrop; modalProps: {string:{}}; modalStep: string; stepIndex: number; onClose: () => void; cropImageElementRef: MutableRefObject; onDeleteClick?: () => void; cropAspectRatio?: { width: number; height: number; }; } export default function SwitchCaseCrop ({imageUrl, cropAspectRatio, handleSizeChange, handleRotateClick, getInitialCrop, onDeleteClick, onClose, modalStep, stepIndex, cropImageElementRef}: Props) { switch (modalStep) { case "desktop": { return( <> ) } case "tablet": { return( <> ) } case "mobile": { return( ) } case "small": { return( ) } } }