import Konva from "konva";
import type { EditorObject } from "../../store/editorStore";

export type ShapeProps = {
  obj: EditorObject;
  isSelected: boolean;
  transformerRef: React.RefObject<Konva.Transformer | null>;
  onSelect: (id: string, node: Konva.Node, e?: Konva.KonvaEventObject<MouseEvent>) => void;
  onUpdate: (id: string, updates: Partial<EditorObject>) => void;
  draggable: boolean;
  stageWidth?: number;
  stageHeight?: number;
  /** Called by async shapes (images) once their content is fully ready to render. */
  onImageReady?: () => void;
};

export type TextShapeProps = ShapeProps & {
  layerRef: React.RefObject<Konva.Layer | null>;
};

