import { ref } from "vue";
const useModuleForm = () => {
  const moduleFormRef = ref({
    plotName: "",
    plotVideoSource: "",
    plotImageSource: "",
  });

  const moduleFormRuleRef = ref({
    plotName: [
      { required: true, message: "请填写剧情模块名", trigger: "blur" },
    ],
    plotVideoSource: [
      { required: true, message: "请选择剧情视频素材", trigger: "change" },
    ],
    plotImageSource: [
      { required: true, message: "请选择剧情封面素材", trigger: "change" },
    ],
  });

  return {
    moduleFormRef,
    moduleFormRuleRef,
  };
};

export default useModuleForm;
