import{_}from"./BaseForm.vue_vue_type_script_setup_true_lang-db6f7c64-1782572373740v=1.0.0.js";import{u as S,g as y}from"./liveSettingApi-cb976010-1782572373740v=1.0.0.js";import{u as b}from"./useFormEdit-e67d5b61-1782572373740v=1.0.0.js";import{a as C}from"./index-f6f689f9-1782572373740v=1.0.0.js";import{E as i}from"./eleVendor-48a7d3b8-1782572373740v=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-866bb149-1782572373740v=1.0.0.js";import"./keepAlive-0ac97bbd-1782572373740v=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};
