import { isValidWidthUnit } from '../../../utils/validators.mjs';
import { buildProps, definePropType } from '../../../utils/props.mjs';
import { UPDATE_MODEL_EVENT } from '../../../utils/constants.mjs';

const dialogProps = buildProps({
  appendToBody: {
    type: Boolean,
    default: false
  },
  beforeClose: {
    type: definePropType(Function)
  },
  destroyOnClose: {
    type: Boolean,
    default: false
  },
  center: {
    type: Boolean,
    default: false
  },
  customClass: {
    type: String,
    default: ""
  },
  closeOnClickModal: {
    type: Boolean,
    default: true
  },
  closeOnPressEscape: {
    type: Boolean,
    default: true
  },
  fullscreen: {
    type: Boolean,
    default: false
  },
  lockScroll: {
    type: Boolean,
    default: true
  },
  modal: {
    type: Boolean,
    default: true
  },
  showClose: {
    type: Boolean,
    default: true
  },
  title: {
    type: String,
    default: ""
  },
  openDelay: {
    type: Number,
    default: 0
  },
  closeDelay: {
    type: Number,
    default: 0
  },
  top: {
    type: String
  },
  modelValue: {
    type: Boolean,
    required: true
  },
  modalClass: String,
  width: {
    type: [String, Number],
    validator: isValidWidthUnit
  },
  zIndex: {
    type: Number
  },
  isShowFooter: {
    type: Boolean,
    default: true
  },
  cancelText: {
    type: String
  },
  submitText: {
    type: String
  },
  loading: {
    type: Boolean,
    default: false
  },
  submitHandle: {
    type: definePropType(Function)
  }
});
const dialogEmits = {
  open: () => true,
  opened: () => true,
  close: () => true,
  closed: () => true,
  handleSubmit: () => true,
  [UPDATE_MODEL_EVENT]: (value) => typeof value === "boolean"
};

export { dialogEmits, dialogProps };
//# sourceMappingURL=dialog2.mjs.map
