import { getImg } from "@/utils";
import type { ExtractPropTypes } from "vue";

type DoneFn = (cancel?: boolean) => void;
export type DialogBeforeCloseFn = (done: DoneFn) => void;

export const titleProps = {
  text: {
    type: String,
    default: "",
  },
  title: {
    type: String,
    default: "",
  },
  EnTitle: {
    type: String,
    default: "",
  },
  rightText: {
    type: String,
    default: "",
  },
  rightIcon: {
    type: String,
    default: getImg("title/dian.png"),
  },
  showIcon: {
    type: Boolean,
    default: false,
  },
} as const;

export type TitleProps = ExtractPropTypes<typeof titleProps>;
export const titleEmits = {};
export type TitleEmits = typeof titleEmits;
