export const defaultActive = [
  'r',
  'rb',
  'b',
  'lb',
  'l',
  'lt',
  't',
  'rt',
] as const;
export type ActionType = (typeof defaultActive)[number];
export const defaultFitParent = ['w', 'h'] as const;
export type FitParentItem = (typeof defaultFitParent)[number];

export interface SizeData {
  x: number;
  y: number;
  w: number;
  h: number;
  zindex?: number;
}

export interface PositionData {
  left: number;
  top: number;
}

export interface ContronItem {
  classes: string[];
  movePoint: ({ left, top }: PositionData) => void;
  movePointOver: (e: MouseEvent) => void;
}

export interface TransformFitParam extends SizeData {
  id: string;
}

export type TransformFitFunction = (
  data: TransformFitParam,
  actionType: ActionType | 'move'
) => SizeData;
