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