/* eslint-disable @typescript-eslint/no-explicit-any */
import { FC, memo } from "react";
import { TransformWidgetWrapper } from "./components/TransformWidgetWrapper";
import { ResizingAndDragContainer } from "./components/ResizingAndDragContainer";
import WrapperContainer from "./components/WrapperContainer";
import { ScaleSquareProps } from "./interface";
import { Platform } from "react-native";
export const ScaleSquare: FC<ScaleSquareProps> = (props) => {
  const {
    unitW,
    displayName,
    parentNodeDisplayName,
    widgetType,
    columnNumber,
  } = props;
  return (
    <>
      {Platform.OS === 'web' ? (
        <ResizingAndDragContainer
        displayName={displayName}
        unitW={unitW}
        widgetHeight={0}
        widgetWidth={0}
        // widgetTop={
        //   // canDrag && widgetType !== "GridCONTAINER_WIDGET" ? top :
        //   0
        // }
        // widgetLeft={
        //   // canDrag && widgetType !== "GridCONTAINER_WIDGET" ? left :
        //   0
        // }
        parentNodeDisplayName={parentNodeDisplayName}
        widgetType={widgetType}
        columnNumber={columnNumber}
      >
          <WrapperContainer
            displayName={displayName}
            parentNodeDisplayName={parentNodeDisplayName}
            widgetHeight={0}
          >
            <TransformWidgetWrapper
              displayName={displayName}
              widgetType={widgetType}
              parentNodeDisplayName={parentNodeDisplayName}
              columnNumber={columnNumber}
              unitW={unitW}
            />
          </WrapperContainer>

        </ResizingAndDragContainer>
      ) : (
        <TransformWidgetWrapper
          displayName={displayName}
          widgetType={widgetType}
          parentNodeDisplayName={parentNodeDisplayName}
          columnNumber={columnNumber}
          unitW={unitW}
        />
      )}
    </>
  );
};

// eslint-disable-next-line react-refresh/only-export-components
export default memo(ScaleSquare);

ScaleSquare.displayName = "NewScaleSquare";
