/* 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-1398c031.js";import{a}from"./index-6d7b8c09.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 I=s({status:0}),X=s([]),A=s([{name:"本周精选",value:1},{name:"优选好剧",value:2}]);return t((()=>{e().then((e=>{X.value=e.data.miniprogramType}))})),(e,l)=>{const s=y,t=_,B=g,C=h,E=x,H=V,T=w;return r((m(),u(H,{model:o(I),"label-width":"120px",ref_key:"form",ref:F,class:"pr-4"},{default:i((()=>[p(B,{label:"小程序类型",prop:"miniprogram_type",rules:[{required:!0,message:"选择小程序类型"}],"label-width":"120px"},{default:i((()=>[p(t,{modelValue:o(I).miniprogram_type,"onUpdate:modelValue":l[0]||(l[0]=e=>o(I).miniprogram_type=e),clearable:"",filterable:"",placeholder:"请选择小程序类型"},{default:i((()=>[(m(!0),d(n,null,c(o(X),((e,a)=>(m(),u(s,{key:a,label:e.label,value:e.value},null,8,["label","value"])))),128))])),_:1},8,["modelValue"])])),_:1}),p(B,{label:"列表名称",prop:"type",rules:[{required:!0,message:"选择列表名称"}],"label-width":"120px"},{default:i((()=>[p(t,{modelValue:o(I).type,"onUpdate:modelValue":l[1]||(l[1]=e=>o(I).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(B,{label:"状态",prop:"status","label-width":"120px",rules:[{required:!0,message:"选择状态"}]},{default:i((()=>[p(C,{modelValue:o(I).status,"onUpdate:modelValue":l[2]||(l[2]=e=>o(I).status=e),"active-value":1,"inactive-value":0},null,8,["modelValue"])])),_:1}),b("div",k,[p(E,{type:"primary",onClick:l[3]||(l[3]=e=>{var l;(l=o(F))&&(U.value=!0,l&&l.validate((e=>{e?(a(I.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"])),[[T,o(U)]])}}});export{q as _};
