/* empty css             *//* empty css                   *//* empty css                    *//* empty css                     *//* empty css                  *//* empty css                 *//* empty css               *//* empty css                  *//* empty css                     *//* empty css                  */import{a as e,v as a}from"./index-7475c2a5.js";import{w as l}from"./index-e8afbbd5.js";import{d as s,m as t,O as r,x as i,o,l as d,w as u,a as m,X as p,f as n,c,F as f,y as v,z as _,e as b,b as j,t as y,A as h,B as q,a4 as k,U as x,Z as g,ay as w,az as V,a0 as O,_ as N}from"./index-0ffeeea6.js";import"./http-ffb58baa.js";/* empty css                   */const U={class:"flex justify-end"},z=N(s({__name:"generateLink",props:{primary:null|Object},emits:["close","success"],setup(s,{emit:N}){const z=s,C=t(),F=t(!1),J=t({}),S=t([]),A=t([]),B=e=>{a({limit:999,...e}).then((e=>{S.value=e.data}))};r((()=>J.value.video_id),((e,a)=>{E({video_id:e})}));const E=a=>{e({is_fee:1,...a}).then((e=>{A.value=e.data}))},I=e=>{e?B({videoName:e}):B()};return z.primary&&(J.value=JSON.parse(JSON.stringify(z.primary))),i((()=>{B()})),(e,a)=>{const s=h,t=q,r=k,i=x,z=g,B=w,E=V,L=O;return o(),d(E,null,{default:u((()=>[m(B,{label:"视频链接"},{default:u((()=>[p((o(),d(z,{model:n(J),"label-width":"120px",ref_key:"form",ref:C,class:"pr-4"},{default:u((()=>[m(r,{label:"短剧",prop:"video_id",rules:[{required:!0,message:"请选择短剧"}]},{default:u((()=>[m(t,{modelValue:n(J).video_id,"onUpdate:modelValue":a[0]||(a[0]=e=>n(J).video_id=e),class:"w-full",clearable:"",filterable:"",remote:"","remote-method":I,placeholder:"请输入短剧"},{default:u((()=>[(o(!0),c(f,null,v(n(S),(e=>(o(),d(s,{key:e.id,label:e.name,value:e.id},null,8,["label","value"])))),128))])),_:1},8,["modelValue"])])),_:1}),n(J).video_id?(o(),d(r,{key:0,label:"剧集",prop:"sequence",rules:[{required:!0,message:"请选择剧集"}]},{default:u((()=>[m(t,{modelValue:n(J).sequence,"onUpdate:modelValue":a[1]||(a[1]=e=>n(J).sequence=e),class:"w-full",clearable:"",filterable:"",placeholder:"请选择剧集"},{default:u((()=>[(o(!0),c(f,null,v(n(A),(e=>(o(),d(s,{key:e.id,label:e.series_name,value:e.series_sequence},null,8,["label","value"])))),128))])),_:1},8,["modelValue"])])),_:1})):_("",!0),b("div",U,[m(i,{type:"primary",onClick:a[2]||(a[2]=e=>{var a;(a=n(C))&&(F.value=!0,a&&a.validate((e=>{e?l(J.value).then((e=>{N("success",e),F.value=!1})).catch((e=>{F.value=!1})):F.value=!1})).then((()=>{})))})},{default:u((()=>[j(y(e.$t("system.confirm")),1)])),_:1})])])),_:1},8,["model"])),[[L,n(F)]])])),_:1})])),_:1})}}}),[["__scopeId","data-v-d303119a"]]);export{z as default};
