import { Transition, h, mergeProps } from "vue";
import { propsFactory } from "@veno-ui/utils";
const makeTransitionProps = propsFactory({
  /**
   * @zh 过渡动画
   */
  transition: {
    type: [Boolean, String, Object],
    default: "ve-fade-transition",
    validator: (val) => val !== true
  }
}, "transition");
const MaybeTransition = (props, { slots }) => {
  const { transition, ...rest } = props;
  if (!transition || typeof transition === "boolean")
    return slots.default?.();
  const { component = Transition, ...customProps } = typeof transition === "object" ? transition : {};
  return h(
    component,
    mergeProps(
      typeof transition === "string" ? { name: transition } : customProps,
      rest
    ),
    slots
  );
};
export {
  MaybeTransition,
  makeTransitionProps
};
//# sourceMappingURL=index.mjs.map
