import{i as c}from"./icons.5214a3f5.js";import{d as u,r as v,b as d,c as f,e as m,y as p,R as _,H as y,E as h,a as g,q as S}from"./registerWidgets.fff064a1.js";const C=u({__name:"SaveButton",props:{runtime:null},setup(a){const i=a,t=v(!1);async function n(){t.value=!0;try{await i.runtime.save()}finally{t.value=!1}}return addEventListener("keydown",e=>{(e.metaKey||e.ctrlKey)&&e.key==="s"&&(e.preventDefault(),n())}),(e,s)=>{var o,r;const l=g("icon");return d(),f("button",{class:h(["save-button",{changes:(o=a.runtime)==null?void 0:o.hasChanges()}]),onClick:s[0]||(s[0]=b=>n())},[m(l,{class:"icon",path:p(c),width:"20",height:"20",fill:"#5A677A"},null,8,["path"]),_(" "+y(t.value?"Saving ...":(r=a.runtime)!=null&&r.hasChanges()?"Save":"Saved"),1)],2)}}});const B=S(C,[["__scopeId","data-v-e76d8dbf"]]);export{B as S};
//# sourceMappingURL=SaveButton.0f1a1078.js.map
