import { ModalFuncProps } from 'antd/lib/modal';
/**
 * useModal S
 */
export interface YModalProps {
  /**
   * content
   */
  content?: () => React.ReactNode | React.ReactNode;
  /**
   * How large should the modal be?
   */
  size?: string | 'large' | 'small' | 'fullScreen';
  /**
   * success callback
   */
  onOk?(): void;
  /**
   * cancel callback
   */
  onCancel?(): void;
  /**
   * iconName
   */
  iconName?: string;
  /**
   * iconStyle
   */
  iconStyle?: any;
  /**
   * iconSize
   */
  iconSize?: number | string;
  /**
   * iconType
   */
  iconType?: string;
  /**
   * antd参数透传
   */
  [others: string]: any;

}
/**
 * useModal E
 */

/**
 * ----------------------------------
 */

/**
 * 图片YModal.IMAGE S
 */
export type ImageItem = {
  /**
   * 图片地址
   */
  src: string;
  /**
   * 图片alt显示
   */
  alt?: string;
};

export interface YModalImgProps {
  /**
   * 显隐
   */
  visible: boolean;
  /**
   * 图片参数
   */
  images: Array<ImageItem>;
  /**
   * 默认显示第几个
   */
  index?: number;
  /**
   * 旋转角度
   */
  rotate?: number;
  /**
   * 放大缩小
   */
  scale?: number;
  /**
   * 点击蒙层是否允许关闭
   */
  maskClosable?: boolean;
  /**
   * 是否支持键盘 esc 关闭
   */
  keyboard?: boolean;
  /**
   * 关闭回调函数
   */
  close?: () => void;
}

export interface YModalImgState extends YModalImgProps {
  /**
   * 显隐
   */
  visible: boolean;
  /**
   * 图片参数
   */
  images: Array<ImageItem>;
  pdfPreivewUrl: string;
  /**
   * 默认显示第几个
   */
  index: number;
  /**
   * 旋转角度
   */
  rotate: number;
  translateX: number;
  translateY: number;
  /**
   * 放大缩小
   */
  scaleX: number;
  scaleY: number;
}
export interface NextPropsType {
  /**
   * 显隐
   */
  visible: boolean;
  /**
   * 默认显示第几个
   */
  index?: number;
  /**
   * 图片参数
   */
  images: Array<ImageItem>;
}

export interface EnventType {
  preventDefault: () => void;
  pageX: number;
  pageY: number;
}

export interface YModalImgOutContainerProps {
  /**
   * 显隐
   */
  visible: boolean;
}
export interface YModalImgOutContainerState {
  /**
   * 显隐
   */
  visible: boolean;
}
/**
 * 图片YModal.IMAGE E
 */

/**
 * ----------------------------------
 */

/**
 * YModal.METHOD S
 */
export interface LessContentPrpos {
  setShowMore: any;
  lessContent: string;
}

export interface MoreContentPrpos {
  moreContent: string;
}

export interface ContentPrpos {
  /**
   * 默认值
   */
  defaultShowMore: boolean;
  /**
   * 简写
   */
  lessContent: string;
  /**
   * 详情
   */
  moreContent: string;
}

export interface ShowMoreProps extends ModalFuncProps {
  /**
   * 弹窗类型 默认值confirm
   */
  modalType?: 'warning' | 'info' | 'success' | 'error' | 'confirm';
  /**
   * 简写
   */
  lessContent: string;
  /**
   * 详情
   */
  moreContent: string;
}
/**
 * YModal.METHOD E
 */

/**
 * ----------------------------------
 */
