/* empty css             *//* empty css                   *//* empty css                     *//* empty css                  *//* empty css                  *//* empty css                 *//* empty css               *//* empty css                  *//* empty css                     *//* empty css                  */import{a as e}from"./index-4625b293.js";import{o as a}from"./index-1398c031.js";/* empty css                 *//* empty css                   */import{d as l,m as s,x as t,X as r,f as o,o as m,l as u,w as i,a as p,c as d,F as n,y as c,e as b,b as f,t as v,a5 as j,A as y,B as _,a4 as g,ar as h,U as x,Z as V,a0 as w}from"./index-0ffeeea6.js";const k={class:"flex justify-end"},q=l({__name:"create",emits:["close"],setup(l,{emit:q}){const U=s(!1),F=s();s("");const X=s({status:0}),A=s([{name:"排行榜",value:1},{name:"最新",value:2}]),B=s([]);return t((()=>{a().then((e=>{B.value=e.data.miniprogramType}))})),(a,l)=>{const s=y,t=_,C=g,E=h,H=x,I=V,T=w;return r((m(),u(I,{model:o(X),"label-width":"120px",ref_key:"form",ref:F,class:"pr-4"},{default:i((()=>[p(C,{label:"小程序类型",prop:"miniprogram_type",rules:[{required:!0,message:"选择小程序类型"}],"label-width":"120px"},{default:i((()=>[p(t,{modelValue:o(X).miniprogram_type,"onUpdate:modelValue":l[0]||(l[0]=e=>o(X).miniprogram_type=e),clearable:"",filterable:"",placeholder:"请选择小程序类型"},{default:i((()=>[(m(!0),d(n,null,c(o(B),((e,a)=>(m(),u(s,{key:a,label:e.label,value:e.value},null,8,["label","value"])))),128))])),_:1},8,["modelValue"])])),_:1}),p(C,{label:"频道名称",prop:"type",rules:[{required:!0,message:"选择频道名称"}],"label-width":"120px"},{default:i((()=>[p(t,{modelValue:o(X).type,"onUpdate:modelValue":l[1]||(l[1]=e=>o(X).type=e),clearable:"",filterable:"",placeholder:"请选择频道名称"},{default:i((()=>[(m(!0),d(n,null,c(o(A),((e,a)=>(m(),u(s,{key:a,label:e.name,value:e.value},null,8,["label","value"])))),128))])),_:1},8,["modelValue"])])),_:1}),p(C,{label:"状态",prop:"status","label-width":"120px",rules:[{required:!0,message:"选择状态"}]},{default:i((()=>[p(E,{modelValue:o(X).status,"onUpdate:modelValue":l[2]||(l[2]=e=>o(X).status=e),"active-value":1,"inactive-value":0},null,8,["modelValue"])])),_:1}),b("div",k,[p(H,{type:"primary",onClick:l[3]||(l[3]=a=>{var l;(l=o(F))&&(U.value=!0,l&&l.validate((a=>{a?(e(X.value).then((e=>{j.success(e.message),q("close")})),U.value=!1):U.value=!1})).then((()=>{})))})},{default:i((()=>[f(v(a.$t("system.confirm")),1)])),_:1})])])),_:1},8,["model"])),[[T,o(U)]])}}});export{q as _};
