import { INPUT_EVENT, UPDATE_MODEL_EVENT } from "../../../constants/event.mjs";
import { isDate, isArray } from "../../../../../@vue/shared/dist/shared.esm-bundler.mjs";
import { buildProps, definePropType } from "../../../utils/vue/props/runtime.mjs";
const isValidRange = (range) => isArray(range) && range.length === 2 && range.every((item) => isDate(item));
const calendarProps = buildProps({
  modelValue: { type: Date },
  range: {
    type: definePropType(Array),
    validator: isValidRange
  },
  controllerType: {
    type: String,
    values: ["button", "select"],
    default: "button"
  },
  formatter: { type: definePropType(Function) }
});
const calendarEmits = {
  [UPDATE_MODEL_EVENT]: (value) => isDate(value),
  [INPUT_EVENT]: (value) => isDate(value)
};
export {
  calendarEmits,
  calendarProps
};
