import { CompUI } from "./components/CompUI";

export type ICompKeys = keyof typeof CompUI;

export type EditorMode = "editPage" | "editComp" | "preview";

export type Layout = {
  position?: "absolute";
  visible?: boolean;
  size: number[]; // width height
  mask?: string;
  alignSelf?: string;
  transform?: {
    r?: number; // rotate
    x?: number; // translateX
    y?: number; // marginTop
    s?: number; // scale
  };
  zIndex?: number;
  margin?: string;
  padding?: string;
  transformMatrix?: string;
  opacity?: number;

  background?: Background;
};

export type Background = {
  color?: string;
  image?: string;
  imageStyle?: string;
  position?:
    | "bottom"
    | "center"
    | "left"
    | "left-bottom"
    | "left-top"
    | "right"
    | "right-bottom"
    | "right-top"
    | "top";
  repeat?:
    | "repeat"
    | "no-repeat"
    | "repeat-x"
    | "repeat-y"
    | "repeat-round"
    | "repeat-space";
  size?: "auto" | "cover" | "contain";
  clipPath?: string;
  // origin?: "border" | "padding" | "content";
};
