import pageModal from "./page-modal.vue";
import { FormConfig as searchFormConfig } from "/@/components/PageSearch";
import { ContentConfig } from "/@/components/PageContent";

export type PageModalInstance = typeof pageModal & {
  dialogVisible: boolean;
  // confirmLoading: boolean;
  // type: ActionType;
};

export interface ModalConfig {
  title: string;
  searchConfig?: searchFormConfig;
  contentConfig?: ContentConfig;
}

export const modalProps = {
  modalConfig: {
    type: Object as PropType<ModalConfig>,
    required: true
  },
  prviewDescription: {
    type: Boolean,
    default: false
  },
  defaultInfo: {
    type: Object,
    required: true
  }
};

export const descritonProps = {
  config: {
    type: Object as PropType<ModalConfig>,
    required: true
  },
  defaultInfo: {
    type: Object,
    required: true
  }
};
