/* 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-1eb7652b.js";import{a}from"./index-e32fd9c9.js";/* empty css                 *//* empty css                   */import{d as l,m as s,x as t,W 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,a4 as j,A as y,B as _,a3 as g,ar as h,S as x,Y as V,$ as w}from"./index-2b50ecca.js";const k={class:"flex justify-end"},q=l({__name:"create",emits:["close"],setup(l,{emit:q}){const U=s(!1),Y=s();s("");const $=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,F=h,M=x,S=V,T=w;return r((m(),u(S,{model:o($),"label-width":"120px",ref_key:"form",ref:Y,class:"pr-4"},{default:i((()=>[p(C,{label:"小程序类型",prop:"miniprogram_type",rules:[{required:!0,message:"选择小程序类型"}],"label-width":"120px"},{default:i((()=>[p(t,{modelValue:o($).miniprogram_type,"onUpdate:modelValue":l[0]||(l[0]=e=>o($).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($).type,"onUpdate:modelValue":l[1]||(l[1]=e=>o($).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(F,{modelValue:o($).status,"onUpdate:modelValue":l[2]||(l[2]=e=>o($).status=e),"active-value":1,"inactive-value":0},null,8,["modelValue"])])),_:1}),b("div",k,[p(M,{type:"primary",onClick:l[3]||(l[3]=e=>{var l;(l=o(Y))&&(U.value=!0,l&&l.validate((e=>{e?(a($.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 _};
