import{a as e}from"./index-a3908905.js";import{a}from"./index-24c7f9a5.js";/* empty css             *//* empty css                   */import{d as l,k as s,p as r,r as i,K as m,J as u,f as o,o as t,j as d,w as n,a as p,c,F as f,q as _,e as v,b,t as y,O as g}from"./index-018fb6dd.js";const q={class:"flex justify-end"},V=l({__name:"create",props:{primary:String|Number},emits:["close"],setup(l,{emit:V}){const j=l,h=s(!1),k=s(),x=s([]),U=s({});j.primary&&(U.value.id=j.primary.id,U.value.series_sequence=j.primary.series_sequence,j.primary);return r((()=>{var a;e({video_id:j.primary.video_id,limit:300,...a}).then((e=>{x.value=e.data}))})),(e,l)=>{const s=i("el-input"),r=i("el-form-item"),w=i("el-option"),J=i("el-select"),C=i("el-button"),F=i("el-form"),I=m("loading");return u((t(),d(F,{model:o(U),"label-width":"120px",ref_key:"form",ref:k,class:"pr-4"},{default:n((()=>[p(r,{label:"推广名称",prop:"name",rules:[{required:!1,message:"推广名称必须填写"}]},{default:n((()=>[p(s,{disabled:"",modelValue:j.primary.name,"onUpdate:modelValue":l[0]||(l[0]=e=>j.primary.name=e),clearable:""},null,8,["modelValue"])])),_:1}),p(r,{label:"入口章节",prop:"series_sequence",rules:[{required:!0,message:"入口章节必须填写",trigger:"change"}]},{default:n((()=>[p(J,{modelValue:o(U).series_sequence,"onUpdate:modelValue":l[1]||(l[1]=e=>o(U).series_sequence=e),filterable:"",clearable:"",placeholder:"选择入口章节"},{default:n((()=>[(t(!0),c(f,null,_(o(x),((e,a)=>(t(),d(w,{key:a,label:e.series_name,value:e.series_sequence},null,8,["label","value"])))),128))])),_:1},8,["modelValue"])])),_:1}),p(r,{label:"备注",prop:"name",rules:[{required:!1,message:"备注必须填写"}]},{default:n((()=>[p(s,{modelValue:o(U).remark,"onUpdate:modelValue":l[2]||(l[2]=e=>o(U).remark=e),clearable:""},null,8,["modelValue"])])),_:1}),v("div",q,[p(C,{type:"primary",onClick:l[3]||(l[3]=e=>{return l=o(k),h.value=!0,void(l&&l.validate((e=>{e?a(U.value).then((e=>{g.success(e.message),V("close"),h.value=!1})):h.value=!1})).then((()=>{})));var l})},{default:n((()=>[b(y(e.$t("system.confirm")),1)])),_:1})])])),_:1},8,["model"])),[[I,o(h)]])}}});export{V as _};
