/* empty css             *//* empty css                   *//* empty css                     *//* empty css                  *//* empty css                  *//* empty css                 *//* empty css               *//* empty css                  *//* empty css                     *//* empty css                  */import{o as e}from"./index-456e0c66.js";import{a}from"./index-7325fac4.js";/* empty css                   */import{d as l,m as s,x as t,Z 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,a7 as j,A as y,B as _,a6 as g,as as h,W as x,a0 as V,a2 as w}from"./index-41bf27b7.js";const k={class:"flex justify-end"},q=l({__name:"create",emits:["close"],setup(l,{emit:q}){const U=s(!1),T=s();s("");const W=s({status:0}),A=s([]),B=s([{name:"本周精选",value:1},{name:"优选好剧",value:2}]);return t((()=>{e().then((e=>{A.value=e.data.miniprogramType}))})),(e,l)=>{const s=y,t=_,C=g,D=h,F=x,Q=V,R=w;return r((m(),u(Q,{model:o(W),"label-width":"120px",ref_key:"form",ref:T,class:"pr-4"},{default:i((()=>[p(C,{label:"小程序类型",prop:"miniprogram_type",rules:[{required:!0,message:"选择小程序类型"}],"label-width":"120px"},{default:i((()=>[p(t,{modelValue:o(W).miniprogram_type,"onUpdate:modelValue":l[0]||(l[0]=e=>o(W).miniprogram_type=e),clearable:"",filterable:"",placeholder:"请选择小程序类型"},{default:i((()=>[(m(!0),d(n,null,c(o(A),((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(W).type,"onUpdate:modelValue":l[1]||(l[1]=e=>o(W).type=e),clearable:"",filterable:"",placeholder:"请选择列表名称"},{default:i((()=>[(m(!0),d(n,null,c(o(B),((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(D,{modelValue:o(W).status,"onUpdate:modelValue":l[2]||(l[2]=e=>o(W).status=e),"active-value":1,"inactive-value":0},null,8,["modelValue"])])),_:1}),b("div",k,[p(F,{type:"primary",onClick:l[3]||(l[3]=e=>{var l;(l=o(T))&&(U.value=!0,l&&l.validate((e=>{e?(a(W.value).then((e=>{j.success(e.message),q("close")})),U.value=!1):U.value=!1})).then((()=>{})))})},{default:i((()=>[f(v(e.$t("system.confirm")),1)])),_:1})])])),_:1},8,["model"])),[[R,o(U)]])}}});export{q as _};
