export type ComStyleConfigType = {
  key: string;
  _displayName: string;
  _value: ComStyleConfigType[] | string | number | boolean;
  _name: string;
  _type?: string;
};

export type ComConfigType = {
  componentId: number;
  componentName: string;
  comConfigTreeData: ComStyleConfigType[];
  sourceConfig: Pick<ComStyleConfigType, '_displayName' | '_name' | '_type' | '_value'>[];
  defaultAllKeys: string[];
  copyedConfig: Pick<ComStyleConfigType, '_displayName' | '_name' | '_type' | '_value'>[];
};

export type PasteOneComponentType = {
  comConfigList: ComConfigType[];
  onChangeCheckedAllStatus: (v: '取消全选' | '全选') => void;
};

export type ChangedConfigType = {
  componentId: number;
  updateData: {
    config: Pick<ComStyleConfigType, '_displayName' | '_name' | '_type' | '_value'>;
  };
};

export type PasteOneComponentRef = {
  onCheckedAll: () => void;
  getUpdateConfig: () => ChangedConfigType[];
};

export type PasteMultipleComponentRef = {
  onCheckedAll: () => void;
  getUpdateConfig: () => ChangedConfigType[];
};

export type PasteMultipleComponentType = {
  comConfigList: ComConfigType[];
  onChangeCheckedAllStatus: (v: '取消全选' | '全选') => void;
};

export type SelectedKeysType = {
  componentId: number;
  checkedKeys: string[];
  defaultAllKeys: string[];
  halfCheckedKeys: string[];
};
