import{_}from"./BaseForm.vue_vue_type_script_setup_true_lang-e9f2f454-1782729249161v=1.0.0.js";import{u as S,g as y}from"./liveSettingApi-f55ff763-1782729249161v=1.0.0.js";import{u as b}from"./useFormEdit-fb8b8504-1782729249161v=1.0.0.js";import{a as C}from"./index-b309bf9f-1782729249161v=1.0.0.js";import{E as i}from"./eleVendor-5008d1ec-1782729249161v=1.0.0.js";import{y as d,r as l,m as L,al as w,z as E,I as T,J as k,R as B,u,k as c}from"./vendor-1e24e3ad-1782729249161v=1.0.0.js";import"./keepAlive-20a782c5-1782729249161v=1.0.0.js";const F=d({name:"liveSettingEdit"}),P=d({...F,setup(U){const{closeCurrent:m}=b(),f=l(null),o=l({coverUrl:[],liveName:"",liveUrl:"",liveStartTime:"",eventLiveStatus:"",createTime:""}),t=l(!1),s=C(),v=()=>{m()},g=async r=>{t.value=!0;try{let e=S,n="\u66F4\u65B0\u6210\u529F",a=await e(r);a.code==0?(i({type:"success",message:`${n}!`}),m()):i.warning(a.msg),t.value=!1}catch{t.value=!1}},p=async r=>{let e=await y(r);if(e.code!=0){i.warning(e.msg);return}e.data.liveStartTime=[e.data.liveStartTimeStart,e.data.liveStartTimeEnd],o.value=e.data};return L(()=>{s.query.id&&(f.value=s.query.id,p(s.query.id))}),(r,e)=>{const n=w("HZPageLayout");return E(),T(n,{title:u(s).meta.title,isBack:!0},{default:k(()=>[B(_,{value:u(o),"onUpdate:value":e[0]||(e[0]=a=>c(o)?o.value=a:null),loading:u(t),"onUpdate:loading":e[1]||(e[1]=a=>c(t)?t.value=a:null),onCancel:v,onSubmit:g},null,8,["value","loading"])]),_:1},8,["title"])}}});export{P as default};
