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