/* empty css             *//* empty css                   *//* empty css                     *//* empty css                  *//* empty css                        *//* empty css                 *//* empty css                       *//* empty css                 */import{d as e}from"./index-0397c8be.js";/* empty css                   */import{d as a,q as r,m as l,z as s,Z as t,o as i,l as u,w as o,e as m,a as d,b as p,t as c,f as n,a7 as g,ae as h,af as f,a6 as v,ad as y,X as b,a0 as _,a2 as j}from"./index-545c1a76.js";const x={class:"flex flex-row justify-between"},q={class:"w-full"},w=m("span",{class:"ml-3 text-gray-400"},"范围:1-30",-1),V={class:"flex items-center w-full"},C=m("span",{class:"ml-3 text-gray-400"},"范围:50-300",-1),S={class:"flex justify-end"},T=a({__name:"subscribeSet",props:{primary:String|Number},emits:["close"],setup(a,{emit:T}){const U=a,E=r(),k=r({status:2,miniProgramIds:[]}),z=l({chargeType:[{required:!0,message:"请选择收费模式",trigger:"change"}],chargeSequence:[{required:!0,message:"请输入起始集",trigger:"blur"},{validator:(e,a,r)=>{a<1||a>30?r(new Error("范围必须在 1 到 30 之间")):r()},trigger:"blur"}],chargeCoin:[{required:!0,message:"请输入单集定价",trigger:"blur"},{validator:(e,a,r)=>{a<50||a>300?r(new Error("范围必须在 50 到 300 之间")):r()},trigger:"blur"}]}),M=r(!1);return U.primary&&(k.value.id=U.primary.id,k.value.chargeCoin=U.primary.charge_coin,k.value.chargeType=U.primary.d_charge_type,k.value.chargeSequence=U.primary.charge_sequence),s((()=>{})),(a,r)=>{const l=h,s=f,U=v,A=y,F=b,I=_,N=j;return t((i(),u(I,{model:k.value,"label-width":"120px",ref_key:"ruleForm",ref:E,rules:n(z),class:"pr-4"},{default:o((()=>[m("div",x,[m("div",q,[d(U,{label:"收费模式",prop:"chargeType"},{default:o((()=>[d(s,{modelValue:k.value.chargeType,"onUpdate:modelValue":r[0]||(r[0]=e=>k.value.chargeType=e)},{default:o((()=>[d(l,{label:1},{default:o((()=>[p("单集固定收费")])),_:1})])),_:1},8,["modelValue"])])),_:1}),d(U,{label:"起始集",prop:"chargeSequence"},{default:o((()=>[d(A,{style:{width:"200px"},modelValue:k.value.chargeSequence,"onUpdate:modelValue":r[1]||(r[1]=e=>k.value.chargeSequence=e),modelModifiers:{number:!0},step:1,"step-strictly":"",placeholder:"请输入起始集"},null,8,["modelValue"]),w])),_:1}),d(U,{label:"单集定价",prop:"chargeCoin"},{default:o((()=>[m("div",V,[d(A,{style:{width:"200px"},modelValue:k.value.chargeCoin,"onUpdate:modelValue":r[2]||(r[2]=e=>k.value.chargeCoin=e),modelModifiers:{number:!0},step:1,"step-strictly":"",placeholder:"请输入单集定价"},null,8,["modelValue"]),C])])),_:1})])]),m("div",S,[d(F,{type:"primary",onClick:r[3]||(r[3]=a=>{return r=E.value,k.value,void(r&&r.validate((a=>{a?e({...k.value}).then((e=>{g.success(e.message),T("close")})):M.value=!1})).then((()=>{})));var r})},{default:o((()=>[p(c(a.$t("system.confirm")),1)])),_:1})])])),_:1},8,["model","rules"])),[[N,M.value]])}}});export{T as _};
