import { PropType, ExtractPropTypes } from "vue";

/***
 * @param apis 请求
 * @param columns 列数据
 */
export interface ContentConfig {
  apis: ContentApis | any;
  columns: any;
}

interface ContentApiResponse {
  code: number;
  message: string;
  data: any;
}

type API = (data: any) => Promise<ContentApiResponse>;

export interface ContentApis {
  httpDetail: API;
}
export const PageDetailProps = {
  contentConfig: {
    type: Object as PropType<ContentConfig>,
    required: true
  }
} as const;


export type PageDetailProps = ExtractPropTypes<typeof PageDetailProps>;
